本文共 285 字,大约阅读时间需要 1 分钟。
01 /** 02 * @version 1.0 03 * @author Rollen-Holt 04 * 设计模式之 ---单例模式 05 * */ 06 07 class hello{ 08 private hello(){ 09 System.out.print("hello"); 10 } 11 public static hello getHello(){ 12 return new hello(); 13 } 14 public static void main(String[] a0){ 15 hello.getHello(); 16 } 17 }转载地址:http://nnlmi.baihongyu.com/