Java.util.Properties.list(PrintWriter out) 方法 Java.util.Properties.list(PrintStream out) 方法 Java.util.Properties.load(InputStream inStream) 方法 Java.util.Properties.list(PrintWriter out) 方法 package com.codingdict; import java.io.PrintWriter; import java.util.*; public class PropertiesDemo { public static void main(String[] args) { Properties prop = new Properties(); PrintWriter writer = new PrintWriter(System.out); // add some properties prop.put("Height", "200"); prop.put("Width", "150"); prop.put("Scannable", "true"); // print the list with a PrintWriter object prop.list(writer); // flush the stream writer.flush(); } } Java.util.Properties.list(PrintStream out) 方法 Java.util.Properties.load(InputStream inStream) 方法