?? 10a6f2d42f410018187e8f4f0cfd5be6
字號:
package Dao;
import java.util.*;
import java.io.*;
public final class Env {
private static Env instance;
public static Env getInstance()
{
if(instance != null)
{
return instance;
}
else
{
makeInstance();
return instance;
}
}
public static synchronized void makeInstance()
{
if(instance == null)
{
instance = new Env();
}
}
private Env()
{
InputStream is = getClass().getResourceAsStream("db.properties");
try{
load(is);
}catch(Exception e)
{
System.out.println("錯誤:沒有讀取屬性文件,請確認(rèn)db.properties文件是否存在");
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -