Results 1 to 2 of 2
Thread: While loop
- 07-18-2007, 02:55 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 5
- Rep Power
- 0
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??
LeeBeeLast edited by leebee; 07-18-2007 at 02:55 PM. Reason: worded wrong
- 07-18-2007, 03:11 PM #2
Member
- Join Date
- Jul 2007
- Posts
- 17
- Rep Power
- 0
Similar Threads
-
Loop Help
By HeavyD in forum New To JavaReplies: 7Last Post: 09-22-2010, 09:55 PM -
do...while loop
By eva in forum New To JavaReplies: 16Last Post: 01-31-2008, 06:44 AM -
while loop
By michcio in forum New To JavaReplies: 5Last Post: 01-27-2008, 12:56 AM -
can you help me with this for loop?
By java_fun2007 in forum New To JavaReplies: 6Last Post: 12-22-2007, 10:20 AM -
A loop that doesn't loop
By MichYer in forum New To JavaReplies: 2Last Post: 07-30-2007, 08:44 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks