摘要:
View Code public class FactoryMethod{ /** * @param args */ public static void main(String[] args) { Factory.condition(2).operation("Hello"); }}class Factory{ public static Api condition(int n) { if (n == 1) { return new ImpA(); } ... 阅读全文
摘要:
多线程import java.io.IOException;import java.util.Set;public class ProcessBuilderDemo{ public static void main(String[] args) { final Person p=new Person(); Thread thread=new Thread() { boolean flag=false; public void run() { ... 阅读全文