Friday 11 October 2013


import java.io.FileInputStream;
import java.util.Scanner;
import java.io.File;

class FileTest1
{
public static void  main(String Dx[])
{
  FileInputStream fin;
 
 try{
            
           
                  
             Scanner scanner = new Scanner(new File("abc.txt"));
            while (scanner.hasNext()) {
             String line = scanner.next();
            String cells[] = line.split(" ");                         
            System.out.println(line);}
                
          System.out.println("Operation is successfully Compleated");      
        }
       catch(Exception 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...