摘要:
//Runnable接口更适合多线程共用一个资源的情况,并且避免了单继承的限制public class test02 { public static void main(String[] args) { Dog dog = new Dog(); Thread thread = new Thread( 阅读全文
摘要:
public class test1 { @SuppressWarnings({"all"}) public static void main(String[] args) throws InterruptedException { Cat cat = new Cat(); cat.start(); 阅读全文
摘要:
Map map = new HashMap(); map.put("邓超","孙俪"); map.put("张三","王五"); map.put("李四","赵六"); map.put(null,"关七"); System.out.println("map = " + map);// remove: 阅读全文