I am new to Java and I am developing a GUI. The problem which I am facing is that I am unable to use the function "readLine()" in file handling. The intellisense is not recognizing this particular method, but I have seen codes in which this method runs perfectly. I have pasted my code below.
try
{
Index ind= new Index();
File file1 = new File(ind.path);
File file2 = new File(file1.getAbsolutePath() + ".tmp");
FileWriter fw1 =new FileWriter(file1,true);
BufferedWriter bf1 = new BufferedWriter(fw1);
BufferedWriter bf2 = new BufferedWriter(new FileWriter(file2));
String line= null;
while((line = bf1.readLine()) != null)
{
String tline = line.trim();
if(tline.contains(inputVal))
{
continue;
}
else
{
bf2.write(line);
}
}
Hoping for a better response.