import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class wordsSelector
{
public static void main(String ar[]) throws FileNotFoundException, IOException
{
wordsSelector ws = new wordsSelector();
ws.start();
}
public void start() throws FileNotFoundException, IOException
{
File f = new File("word"); //word is a dictionary file
FileReader fr = new FileReader(f);
BufferedReader br = new BufferedReader(fr);
while((br.readLine())!=null)
{
String words = br.readLine();
if(words.length()>7 && words.length()<19) //xtracts words from 8 to 18
System.out.println(words);
}
}
}
No comments:
Post a Comment