Saturday, January 12, 2013

PrintStreamExample


package com.basics;
/*
 *
 * System class static field of type PrintStream has method println of printstream.
 * same thing holds for err also which is the reference to static field of printstream
 */
public class PrintStreamExample {
public static void main(String args[]) {
System.out.println("this is printstrean class method println");
System.err.println("this is printstrean class method println for error stream");
}

}

No comments:

Post a Comment