PrintWriter: println(long x) : PrintWriter « java.io « Java by API






PrintWriter: println(long x)

 


import java.io.PrintWriter;

public class Main {

  public static void main(String args[]) throws Exception {

    PrintWriter pw = new PrintWriter(System.out);

    // Experiment with some methods
    pw.println(true);
    pw.println('A');
    pw.println(500);
    pw.println(40000L);
    pw.println(45.67f);
    pw.println(45.67);
    pw.println("Hello");
    pw.println(new Integer("99"));

    // Close print writer
    pw.close();
  }
}

   
  








Related examples in the same category

1.new PipedWriter()
2.new PrintWriter(BufferedWriter, boolean autoFlush)
3.new PrintWriter(Writer out)
4.PrintWriter: close()
5.PrintWriter: print(char c)
6.PrintWriter: print(int i)
7.PrintWriter: println(Object x)
8.PrintWriter: println(String x)
9.PrintWriter: println(char x)
10.PrintWriter: println(double x)
11.PrintWriter: println(float x)
12.PrintWriter: println(int x)
13.PrintWriter: println()
14.Writer: write(char[] cbuf)