开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜