Saturday 9 November 2013

how to read charcter in java

 import java.io.*;
class readchar

   public static void main(String a[])
   {
         FileReader ins=null;
         int b;
         try
         {
           ins=new FileReader(a[0]);
            while((b=ins.read())!=-1)
            {
              System.out.println((char)b);
            }
            ins.close();
         }
         catch(IOException e)
         {
           System.out.println(e);
         }
      }
}

No comments:

Post a Comment

How to change Background color by selecting color from Listview

activitymain.xml file::> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xm...