I get this warning... If you could plz help...
import java.io.*;
import java.util.ArrayList;
public class DataBase {
private ArrayList<String> words = new ArrayList<String>();
public DataBase(){
try{
String line = " ";
FileReader freader = new FileReader("someText.txt");
BufferedReader reader = new BufferedReader(freader);
File fileOut = new File("newText.txt");
FileWriter writer = new FileWriter(fileOut);
while(line != null)
{
String[] parts = null;
line = reader.readLine();
parts = line.split(" ");
for (String word : parts)
{
word = word.toUpperCase();
word = word.replaceAll("[:»«,.;!?(){}\\[\\]<>%]","");
if(word.length() > 3 && !word.matches(".*\\d+.*"))
{
writer.write(word);
writer.write(System.lineSeparator());
words.add(word);
}
}
}
reader.close();
writer.close();
}
catch(FileNotFoundException e)
{
System.out.println("File not found!");
}
catch(IOException e)
{
e.printStackTrace();
}
}
}
Thanks in advance :)