上一页 1 ··· 3 4 5 6 7
摘要: 1 //定义一个点point类用来表示三维空间中的点(有三个坐标),要求如下 2 //1.可以生成特定坐标点的对象 3 //2.可以提供设置三个坐标的方法 4 //3.提供可以计算该点距原点距离平方的方法 5 6 class Point 7 { 8 double x,y,z; 9 public Point(double _x,double _y,double _z)10 {11 x=_x;12 y=_y;13 z=_z;14 }15 public void setPoint(double _x)16 ... 阅读全文
posted @ 2013-03-27 17:16 glt66 阅读(1676) 评论(0) 推荐(0) 编辑
摘要: class BirthDay{ int year; int month; int day; public BirthDay(int y,int m,int d) { year=y; month=m; day=d; } public void setYear(int y) { year=y; } public void setMonth(int m) { month=m; } public void setDay(int d) { day=d; } public int getYear() { return year; } public int getMonth() { re... 阅读全文
posted @ 2013-03-27 10:57 glt66 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 类名的首写字母大写变量名和方法名的手写字母小写运用驼峰标识 阅读全文
posted @ 2013-03-27 10:29 glt66 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1 public class Person 2 { 3 int id; 4 int age; 5 Person(int _id,int _age) 6 { 7 id=_id; 8 age=_age; 9 }10 public static void main(String[] ages)11 {12 Person tom=new Person(1,25);13 Point p=new Point(); 14 }15 } 1... 阅读全文
posted @ 2013-03-27 09:11 glt66 阅读(114) 评论(0) 推荐(0) 编辑
摘要: netstat -nap |grep port 阅读全文
posted @ 2013-03-26 13:31 glt66 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 客户端(如页面)发起的,在服务端收到的叫request,可以从中得到请求头信息,请求源,要请求的地址,请求的内容.然后服务端处理这个请求,根据从请求得到的东西来做相应的处理.处理完成后,发起回应,这叫response.回应头内容一般包含,这个回应返回的类型是什么(比如流,还是html,还是图片,或其他),是否允许缓存页面,该回应使用的字符集等等信息.回应体一般是response输出流中的内容如果不回应页面将会在连接超时后得到个404错误.request==取数据response==写数据request是基于服务端用于跳转页面时名为转发地址栏不变化保存request域response是基于客户端 阅读全文
posted @ 2013-03-26 09:45 glt66 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 1 public class Dog { 2 static int furColor; 3 float height; 4 float weight; 5 6 void catchMouse(Mouse m) { 7 //as;dfj;asdf 8 //asdfj;asf 9 //m.scream();10 }11 12 public static void main(String[] args) {13 //int i;14 System.out... 阅读全文
posted @ 2013-03-25 09:13 glt66 阅读(169) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7