Hey Friends this code shows a simple example of buffered in Java:
Reader.java:
import java.io.*;
class Bufferedreader {
public static void main(String args[]) throws IOException
{
  String s="This is a © copywrite symbol but this is &copy not.\n";
  char b[]=new char[s.length()];
  s.getChars(0,s.length(),b,0);
  BufferedReader f=new BufferedReader(b);
  int c;
  while((c=f.read())!=-1)
  {
    System.out.print((char)c);
  }
 }
}
Have Fun.........

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.