• IoDH单例模式


    1. class SingletonIoDH {  
    2.     private Singleton() {  
    3.     }  
    4.       
    5.     private static class HolderClass {  
    6.             private final static Singleton instance = new Singleton();  
    7.     }  
    8.       
    9.     public static SingletonIoDH getInstance() {  
    10.         return HolderClass.instance;  
    11.     }  
    12.       
    13.     public static void main(String args[]) {  
    14.         SingletonIoDH s1, s2;   
    15.             s1 = SingletonIoDH.getInstance();  
    16.         s2 = SingletonIoDH.getInstance();  
    17.         System.out.println(s1==s2);  
    18.     }  
    19. }  
     
     

     

  • 相关阅读:
    输入分隔符
    GO
    match|align|identify|cover_rate
    KEGG
    InterProScan
    Functional annotation
    GeneWise
    get middle lines
    goland debug web app with urfave cli
    go mod proxy
  • 原文地址:https://www.cnblogs.com/yangforyou/p/6898129.html
Copyright © 2020-2023  润新知