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 3 of 3

Thread: what is differences between the methods next() and nextLine()?

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default what is differences between the methods next() and nextLine()?

    what is differences between the methods next() and nextLine()?
    You can give an example for it?


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

    Default Re: what is differences between the methods next() and nextLine()?

    what is differences between the methods next() and nextLine()
    4 letters Seriously, next and nextLine of what? I presume you mean the class Scanner (Java Platform SE 6) or something similar...that link provides detailed descriptions of the methods. If you are still confused I recommend you write some code and play with the methods and see how they behave.

  3. The Following User Says Thank You to copeg For This Useful Post:

    tuanvu_n (April 15th, 2011)

  4. #3
    Junior Member
    Join Date
    Mar 2011
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: what is differences between the methods next() and nextLine()?

    Oh, I think I understand this problem. thanks for your help

Similar Threads

  1. name=scan.nextLine();
    By Amro in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 13th, 2010, 07:38 PM
  2. I need help! Re: strings, nextLine, while and more..
    By rockerade in forum What's Wrong With My Code?
    Replies: 19
    Last Post: October 5th, 2010, 03:51 PM
  3. Replies: 1
    Last Post: August 13th, 2010, 06:58 AM
  4. Difference between input.next and findInLine(".")charat(0)
    By lotus in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: July 6th, 2009, 05:10 AM
  5. Differences Between Java and C,C++
    By sriraj.kundan in forum Java Theory & Questions
    Replies: 2
    Last Post: June 20th, 2009, 01:11 PM