what is the data type of "value" acsessed from properties file
I am accessing value in my java file like mentioned bellow.So what is the data type of "value" acsessed from properties file. Iwanted to know which class needs to imported to use 开发者_如何学运维properties ?
Properties properties = new Properties();
properties.load(new FileInputStream("path/filename"));
Your values will be of String type, you can parse them into int / double / whatever you want.
Per the Java docs:
String getProperty(String key)
Object setProperty(String key, String value)
So you're storing and retrieving string values for each property key and each property value.
精彩评论