下面代码第九行是什么意思?

  1. public class ConfigManager {                      //读取配置文件的工具类,单例模式 

  2. private static ConfigManager configManager;

  3. private static Properties properties;

  4. private ConfigManager() {            //必须以private修饰

  5. String configFile = "database.properties";

  6. properties = new Properties(); 

  7. InputStream is = ConfigManager.class.getClassLoader().getResourceAsStream(configFile);

  8. try {


  9. properties.load(is);

  10. is.close();

  11. } catch (IOException e) {

  12. e.printStackTrace();

  13. }

  14. }


fenkapian
浏览 1365回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java