Properties.list(PrintStream out) has the following syntax.
public void list(PrintStream out)
In the following code shows how to use Properties.list(PrintStream out) method.
// w ww . j a v a 2s . c o m import java.util.Properties; public class Main { public static void main(String[] args) throws Exception { Properties prop = new Properties(); prop.put("Chapter Count", "200"); prop.put("Tutorial Count", "150"); prop.put("tutorial", "java2s.com"); prop.put("Runnable", "true"); // print the list with System.out prop.list(System.out); } }
The code above generates the following result.