10:29 pm - Monday March 27, 2017

To list out to the specified output stream using list(PrintStream out) method.

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

BACK

This tutorial explains how to list out to the specified output stream using list(PrintStream out) method.Properties list(PrintStream out) prints this property list out to the specified output stream.

 


import java.util.Properties;
public class PropertyList
{
public static void main(String[] args)
{
 Properties prop = new Properties();
     prop.put("Chapter Count", "200");
     prop.put("Tutorial Count", "150");
     prop.put("tutorial", "java2s.com");
     prop.put("Runnable", "true");           
     prop.list(System.out);

}
}

Output

– listing properties –

Chapter Count=200

Tutorial Count=150

Runnable=true

tutorial=java2s.com

BACK

Filed in: Java Examples

Comments are closed.