摘要:
MyKey 1 import java.util.*; 2 public class MyKey 3 { 4 private String name = null; 5 private int age = 0; 6 7 public boolean equals(Object obj) 8 { 9 if(obj instanceof myKey) // 对象与mykey 对象比较10 {11 MyKey objTemp=(MyKey)obj;12 if(name.equals(o... 阅读全文
摘要:
集合类包括;: vector ,eView Code import java.util.*;public class TestCollection { /** * Method main * * * @param args * */ public static void main(String[] args) { Arraylist v=new Arraylist(); System.out.println("please enter number:"); while(true) ... 阅读全文
摘要:
public class TestInteger { public static void main(String[] args) { int w=new Integer(args[0]).intValue(); //将一个字符串变为数字的方法 int h=Integer.parseInt(args[1]); int j; // int h=Integer.valueOf(args[1].intValue()); for (int i=0;i<h;i++) { StringBuffer sb=new StringBuffer(); //string... 阅读全文