Results 1 to 2 of 2

Thread: While loop

  1. #1
    leebee is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Question 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 02:55 PM. Reason: worded wrong

  2. #2
    sathish_2111 is offline Member
    Join Date
    Jul 2007
    Posts
    17
    Rep Power
    0

Similar Threads

  1. Loop Help
    By HeavyD in forum New To Java
    Replies: 7
    Last Post: 09-22-2010, 09:55 PM
  2. do...while loop
    By eva in forum New To Java
    Replies: 16
    Last Post: 01-31-2008, 06:44 AM
  3. while loop
    By michcio in forum New To Java
    Replies: 5
    Last Post: 01-27-2008, 12:56 AM
  4. can you help me with this for loop?
    By java_fun2007 in forum New To Java
    Replies: 6
    Last Post: 12-22-2007, 10:20 AM
  5. A loop that doesn't loop
    By MichYer in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 08:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •