import java.io.*;
import java.util.*;
class file4{ static int kc = 0; public static void main(String []arg) throws IOException{ FileReader fr = new FileReader("D:\\java\\f1.txt"); //the file should contain words separated by spaces ! BufferedReader br2 = new BufferedReader(fr); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); Random r = new Random();
String st = br2.readLine(); //Works for single line.Use while loop till null if file contains multiple lines. //System.out.println(st);
2 comments:
Nice work shyamel
quite sophisticated
Post a Comment