Reader Ready() Example

Tells whether this stream is ready to be read.


Reader class Ready() method example. This example shows you how to use Ready() method.This method Tells whether this stream is ready to be read.

Here is the code:-

/**
 * @Program that Tells whether this stream is ready to be read.
 * Ready.java 
 * Author:-RoseIndia Team
 * Date:-5-jun-2008
 */
import java.io.*;
public class Ready {
public static void main(String[] args)throws IOException {
 String s = "RoseIndia";
 StringReader reader = new StringReader(s);
 boolean b=reader.ready();
 System.out.println("stream is ready to be read: "+b);
    }

}

Output of the Program
 stream is ready to be read: true

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

HOME | COPYRIGHT | CONTACT US