PrintStream Print7() Example

Prints a long integer.


PrintStreamclass Print7() method example. This example shows you how to use Print7() method.This method Prints a long integer.

Here is the code:-

/**
 * @Program that Prints a long integer.
 * Print7.java 
 * Author:-RoseIndia Team
 * Date:-10-Jun-2008
 */
import java.io.*;

public class Print7 {

    public static void main(String[] argsthrows IOException {
        long d = 84;
        //Creating FileOutputStream object
        FileOutputStream out = new FileOutputStream("text.txt");
        FileInputStream fin = new FileInputStream("text.txt");
        //Creating PrintStream object
        PrintStream ps = new PrintStream(out);
        //Prints a long integer.
        ps.print(d);
        System.out.print("Long integer. : ");
        System.out.print((charfin.read());
        System.out.print((charfin.read());
           }
}

Output of the Program
 Long integer. : 84

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US