摘要: 比ietest 更好的浏览器调试工具 Browser Sandboxhttp://wenku.baidu.com/view/449ce3a10029bd64783e2c54.html 阅读全文
posted @ 2013-04-09 16:14 glt66 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1 public class NumSort { 2 public static void main(String[] args) { 3 int[] a = new int[args.length]; 4 for (int i=0; i<args.length; i++) { 5 a[i] = Integer.parseInt(args[i]); 6 } 7 print(a); 8 selectionSort(a); 9 print(a);10 }11 ... 阅读全文
posted @ 2013-04-08 15:13 glt66 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1 public class Test { 2 public static void main(String arg[]){ 3 if (arg.length<3) 4 { 5 System.out.println("输入错误"); 6 System.exit(-1); 7 } 8 double a=Double.parseDouble(arg[0]); 9 double b=Double.parseDouble(arg[1]);10 dou... 阅读全文
posted @ 2013-04-08 14:51 glt66 阅读(117) 评论(0) 推荐(0) 编辑
摘要: public class Test { public static void main(String arg[]){ int[] a={2,4,6,8,10}; for (int i=0;i<a.length;i++) { System.out.println(a[i]); } for (int i=0;i<arg.length;i++) { System.out.println(arg[i]); } }}Vi... 阅读全文
posted @ 2013-04-08 14:01 glt66 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.*; 2 3 public class BasicGeneric { 4 public static void main(String[] args) { 5 List<String> c = new ArrayList<String>(); 6 c.add("aaa"); 7 c.add("bbb"); 8 c.add("ccc"); 9 for(int i=0; i<c.size(); i++) {10 String s = c.get(... 阅读全文
posted @ 2013-04-08 10:40 glt66 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1 Set s1=new HashSet(); 2 Set s2=new HashSet(); 3 s1.add("a"); 4 s1.add("b"); 5 s1.add("c"); 6 s2.add("d"); 7 s2.add("a"); 8 s2.add("b"); 9 Set sn=new HashSet(s1);10 sn.retainAll(s2);11 Set su=new HashSet(s1);12... 阅读全文
posted @ 2013-04-06 11:14 glt66 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.*; 2 3 class Name 4 { 5 private String firstName,lastName; 6 7 public String getFirstName() { 8 return firstName; 9 }10 11 public void setFirstName(String firstName) {12 this.firstName = firstName;13 }14 15 public String getLastName()... 阅读全文
posted @ 2013-04-06 09:18 glt66 阅读(146) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;class Name{ private String firstName,lastName; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public voi... 阅读全文
posted @ 2013-04-05 16:24 glt66 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.*; 2 3 class Name 4 { 5 public String name; 6 public String sex; 7 public Name(String name,String sex) 8 { 9 this.name=name;10 this.sex=sex;11 } public String toString() { return name+" "+sex; }12 }13 14 public class testarrlist {15... 阅读全文
posted @ 2013-04-05 14:56 glt66 阅读(145) 评论(0) 推荐(0) 编辑
摘要: public class TestEquals { public static void main(String[] args) { Cat c1 = new Cat(1, 2, 3); Cat c2 = new Cat(1, 2, 6); System.out.println(c1 == c2); System.out.println(c1.equals(c2)); String s1 = new String("hello"); String s2 = new String("hell... 阅读全文
posted @ 2013-04-03 19:43 glt66 阅读(136) 评论(0) 推荐(0) 编辑