摘要:
实现单例模式的八种方式 第一种: public class Mg01 { private static final Mg01 INSTANCE = new Mg01(); private Mg01() { } public static Mg01 getInstance() { return INS 阅读全文
摘要:
1、第一种方式,@Bean指定initMethod和destoryMethod @Bean(name={"person"},initMethod = "init",destroyMethod = "destroy") public Person person(){ return new Person 阅读全文
摘要:
IO 1、标准输入:FileInputStream File file = new File("abc.txt"); InputStream in = null; try { in = new FileInputStream(file); byte[] bytes = new byte[2]; in 阅读全文