Thread: While loop
View Single Post
  #1 (permalink)  
Old 07-18-2007, 04:55 PM
leebee leebee is offline
Member
 
Join Date: Jul 2007
Posts: 5
leebee is on a distinguished road
While loop
Hi, i am using a bufferedReader to realines from a file but i have to put a while loop in, so it loops round and reads all 10 lines.

But how do i make the while loop work as i have tried everything i can think of,

String str;
str = bufReader.readLine()

while(str == null) -- but i want it to say not null but !== null, doesnt work
{
System.out.println(str)
str.bufReader.readLine();
}

Any ideas anyone??

LeeBee

Last edited by leebee : 07-18-2007 at 04:55 PM. Reason: worded wrong
Reply With Quote
Sponsored Links