⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testsingleton.java

📁 程序设计模式java入门源码大全
💻 JAVA
字号:
public class TestSingleton 
{
  public static void main(String args[])
  {
    Database database;

    database = Database.getInstance("products");
      
    System.out.println("This is the " + 
      database.getName() + " databse.");

    database = Database.getInstance("employees");
      
    System.out.println("This is the " + 
      database.getName() + " databse.");
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -