`
微笑_SmileZ
  • 浏览: 841 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论
文章列表
饿汉式 class Singleton {   private static Singleton instance=new Singleton();   private Singleton(){}   static Singleton getInstance() {       return instance;   } } 懒汉式 class Singleton {   private static Singleton instance=null;   private Singleton(){}   static Singleton getInstance() {       if(instan ...
Binary.java import java.util.Stack; public class BinaryTree { protected Node root; public BinaryTree(Node root) {    this.root = root; } public Node getRoot() {    return root; } /** 构造树 */ public static Node init() {    Node a = new Node('A');    Node b = new Node('B', null, a);    Node c = ne ...
Global site tag (gtag.js) - Google Analytics