摘要:
import java.util.HashMap;public class Test { public Test() { // TODO Auto-generated constructor stub } public static void main(String[] args) { // TODO Auto-generated method stu... 阅读全文
摘要:
package Person;public class Person { String name; int age; public Person() { // TODO Auto-generated constructor stub } public boolean equals(Object obj) { if (this == obj)... 阅读全文
摘要:
映射中的每一个元素包含一个键对象和一个值对象,键不可以重复,值可以重复import java.util.HashMap;public class Test { public static void main(String[] args) { // TODO Auto-generated method stub HashMap hashMap = new HashM... 阅读全文
摘要:
集合中的对象不按特定的方式排序,并且没有重复对象import java.util.HashSet;import java.util.Iterator;import java.util.Set;public class Test { public static void main(String[] args) { // TODO Auto-generated method stu... 阅读全文
摘要:
import java.util.ArrayList;public class Test { public static void main(String[] args) { // TODO Auto-generated method stub ArrayList arrayList = new ArrayList(); arrayList.add(... 阅读全文
摘要:
public class MyThread implements Runnable { int i = 0; @Override public void run() { while (true) { synchronized (this) { // TODO Auto-generated method stub ... 阅读全文