[RESOLVED] I am confused..
I am trying this:
Code:
try(BufferedReader br = new BufferedReader(new FileReader("T.txt")); BufferedWriter bw = new
BufferedWriter(new FileWriter("T.txt"))) {
read = br.readLine();
ArrayList ara = new ArrayList();
do {
br.readLine();
ara.add(read);
}while(br.hasRemaining());
Error:
Code:
Test2.java:70: error: cannot find symbol
}while(br.hasRemaining());
^
symbol: method hasRemaining()
location: variable br of type BufferedReader
1 error
complete!
Press any key to continue . . .
What am I doing wrong I've even imported the Buffer API package. I would really appriciate a nice apt explaination of what exactly the "." operator does. Because, I don't fully understand it. Or if you can explain it here. *edit* I suppose I understand that br.hasRemaining doesn't work, because bufferedReader doesn't have a hasRemaining method. I would still like a nice explainatoin of the "." operator.