If i have a txt file I want a comp to read what is the syntax to read the whole file.
String oneLine;
{
try
{
BufferedReader in = new BufferedReader(new FileReader("restaurant.in.txt));
oneLine = in.readLine();
}
I am assuming it is reading the first line. How would I be able to tell the machine to read the next line and store it as a seperate string and the next line and so forth?
Thanx
String oneLine;
{
try
{
BufferedReader in = new BufferedReader(new FileReader("restaurant.in.txt));
oneLine = in.readLine();
}
I am assuming it is reading the first line. How would I be able to tell the machine to read the next line and store it as a seperate string and the next line and so forth?
Thanx