import java.io.FileInputStream;
import java.util.Enumeration;
import java.util.Properties;
publicclass MainClass {
publicstaticvoid main(String args[]) throws Exception {
Properties p = new Properties();
p.load(new FileInputStream("test.txt"));
Enumeration e = p.propertyNames();
for (; e.hasMoreElements();) {
System.out.println(e.nextElement());
}
}
}
//File: test.txt
/*
foo:bar
one
two
three=four
five six seven eight
nine ten
*/