Results 1 to 6 of 6
  1. #1
    logicfreak is offline Member
    Join Date
    Nov 2011
    Posts
    3
    Rep Power
    0

    Default do while loop problem

    I solved my problem. Thanks.
    Last edited by logicfreak; 11-04-2011 at 10:22 PM.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default Re: do while loop problem

    The code works for me with or without the println being commented out. Can you run the program and copy the console here that shows the problem. Add comments to the posting to show where the problem is.
    Here is the console from when I ran the code with the println executing:
    Java Code:
    Microsoft Windows XP [Version 5.1.2600]
    
    D:\JavaDevelopment\Testing\ForumQuestions6>java Scanner_Test
    dfsdfdfssdf
    
    342342342234
    
    23423443
    
    423234342234
    
    8998998
    
    
    
    dfsdfdfssdf342342342234234234434232343422348998998
    D:\JavaDevelopment\Testing\ForumQuestions6>

  3. #3
    logicfreak is offline Member
    Join Date
    Nov 2011
    Posts
    3
    Rep Power
    0

    Default Re: do while loop problem

    Ya I tried in console and it worked correctly. I'm working with that using JCreator Pro maybe there's some bug with that compiler. I tried to code that manually but it is working now. I just figured out that it has problem with the compiler itself.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default Re: do while loop problem

    It could be the way your IDE (not the compiler) handles console I/O.

  5. #5
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,770
    Blog Entries
    7
    Rep Power
    21

    Default Re: do while loop problem

    Quote Originally Posted by logicfreak View Post
    I just figured out that it has problem with the compiler itself.
    No, it's bit rot; if not it's always someone else's fault.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  6. #6
    logicfreak is offline Member
    Join Date
    Nov 2011
    Posts
    3
    Rep Power
    0

    Default Re: do while loop problem

    Oh I mean the IDE, no problem with the compiler javac but its the JCreator Pro. I compiled it and ran using the command prompt and it worked.

Similar Threads

  1. Problem with For Loop
    By dave12har in forum New To Java
    Replies: 5
    Last Post: 11-30-2010, 04:35 PM
  2. While loop problem
    By mochibon in forum New To Java
    Replies: 3
    Last Post: 04-18-2010, 09:21 PM
  3. Problem with the while loop
    By molokomesto in forum New To Java
    Replies: 4
    Last Post: 02-14-2010, 06:01 PM
  4. simple line problem / for loop problem
    By helpisontheway in forum New To Java
    Replies: 1
    Last Post: 11-17-2009, 07:12 AM
  5. Help with a loop-like problem
    By Jnoobs in forum New To Java
    Replies: 1
    Last Post: 10-14-2009, 02:15 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
  •