We would like to know how to list Properties to a print stream or print writer.
import java.io.FileInputStream; import java.util.Properties; /*from ww w . ja va2s. com*/ public class MainClass { public static void main(String args[]) throws Exception { Properties p = new Properties(); p.load(new FileInputStream("test.txt")); p.list(System.out); } }
The code above generates the following result.
The code above generates the following result.