I got a .property file with many user information, I want to get all the users name in a array, but .getProperty only return me the last one, should I use a for each or is there any another way to make it?
prop = new Properties();
prop.load(new FileInputStream("resource/GenLoadFlowEnv.properties"));
String env = (prop.getProperty("ambiente"));
You can simply place
ambiente = a,b,c
And than get the array
String env = (prop.getProperty("ambiente"));
String[] arr = env.split(",");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.