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

Thread: Beginner question on Two Terms (Scanner and Double)

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Beginner question on Two Terms (Scanner and Double)

    Hi guys/gals,

    I understand that there are tons of books out there, most of which are written very clearly. However, while I prowl through Liang and various searches on Google, I haven't been able to get a really clear answer on this query:

    I realize (correct me if I'm wrong!) that keywords like Double and Scanner act like containers for various values... what exactly is the difference? What, in fact, is a 'class'? A de facto container?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Beginner question on Two Terms (Scanner and Double)

    You should do some reading about Java programming to get a bigger picture of how it fits together.

    Two resources:
    http://docs.oracle.com/javase/tutori...ybigindex.html
    http://docs.oracle.com/javase/8/docs/api/index.html


    keywords like Double and Scanner
    Double and Scanner are the names of classes. They are not keywords.
    If you don't understand my answer, don't ignore it, ask a question.

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

    sdmazarin (August 28th, 2019)

  4. #3
    Junior Member
    Join Date
    Aug 2019
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Beginner question on Two Terms (Scanner and Double)

    Okay, thanks Norm... you've directed me to things I'll look at more closely. I'm still curious in my early forays in coding about why Double and Scanner are used in certain circumstances when, to a neophyte, it seems like they could be used interchangeably.

  5. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Beginner question on Two Terms (Scanner and Double)

    You need to read the API doc (at the second link I posted) for those two classes to see what they do.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Basic scanner question
    By Atlantic2012 in forum File I/O & Other I/O Streams
    Replies: 7
    Last Post: January 30th, 2018, 06:29 PM
  2. Replies: 4
    Last Post: December 4th, 2012, 06:11 PM
  3. Hangman java question double letters
    By sparky971 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 9th, 2012, 01:01 PM
  4. Challenging Java Question: Test your Java skill by grouping these terms
    By karthickk3 in forum Java Theory & Questions
    Replies: 3
    Last Post: July 18th, 2012, 10:10 PM