The
list(PrintStream) method of
Properties class is used to print this Properties list out to the specified output stream, passed as the parameter. This method can be used for debugging purpose as it can help to see the Properties elements on the stream.0
Syntax:
public void list(PrintStream out)
Parameters: This method accepts a parameters
PrintStream out which is the output stream on which the Properties elements are to be printed.
Returns: This method just prints the elements and do not return anything.
Below programs show the implementation of int list(PrintStream) method.
Program 1:
Output:
Properties: {Book=500, Mobile=5000, Pen=10, Clothes=400}
listing out the Properties:
-- listing properties --
Book=500
Pen=10
Mobile=5000
Clothes=400
Program 2: