摘要:
wait(),notify()和notifyAll() 他们都是java.lang.Object的方法: wait(): Causes the current thread to wait until another thread invokes the notify() method or the 阅读全文
摘要:
多线程的一个接口和一个类 //Runnable接口: @FunctionalInterface public interface Runnable { public abstract void run(); } //Thread类,它其实也是实现了Runnable接口 public class Th 阅读全文
摘要:
问题引入 有一个简单的java类Apple,需要对List实例进行筛选,比如选出“红苹果”、“绿苹果”、“重苹果”、“又红又重的苹果”,你会怎么做? 相关类和数据 public static class Apple { private int weight = 0; private String c 阅读全文