How to read a file in java?
import java.io.*;
public class Read
{
public static void main(String[] args)throws Exception
{
File file = new File(""C:\\Users\\LBL\\Desktop\\test.txt"");
BufferedReader br = new BufferedReader(new FileReader(file));
String st;
while ((st = br.readLine()) != null)
System.out.println(st);
}
}