Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Why won't it do a simple scan.nextLine?

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Location
    U.S.A.
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Why won't it do a simple scan.nextLine?

    I'm new to programming and I haven't had too much difficulty yet, but I can't see anything wrong with the way I'm asking for a string variable. The program compiles just fine, but then when I run the program, it immediately ends the program before I can enter in my variable "rating". Can someone please tell me how to fix it?
    Last edited by boxofsoap; November 19th, 2011 at 03:09 PM. Reason: I already solved the problem! :)


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Why won't it do a simple scan.nextLine?

    Solved perhaps, but for future reference I encourage you to read the link in my signature entitled getting help.

Similar Threads

  1. Fixing the scan input
    By Twoacross in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 14th, 2011, 07:42 AM
  2. Scan the value of an object?
    By tuanvu_n in forum File I/O & Other I/O Streams
    Replies: 6
    Last Post: July 19th, 2011, 12:49 PM
  3. netbean nextLine
    By Joy123 in forum Java Theory & Questions
    Replies: 2
    Last Post: July 8th, 2011, 08:43 PM
  4. name=scan.nextLine();
    By Amro in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 12th, 2010, 07:01 AM
  5. Replies: 1
    Last Post: August 13th, 2010, 06:58 AM