Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
noob question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

noob question



My instructor has us using the Scanner class (java.util.Scanner) and I want to see what all the public method are, that I can use. Can someone give me a website that would be helpful in searching these classes so I can see what is available to me. I've heard there is a way to do it sometime ago, but I have not come across a place in my book (Yet) that describes how to go about looking at the library classes.  Thank you for any assistance.

Detail:
I was given an example of the Scanner class in which I can:

import java.util.Scanner;

public clas..............
   ............
   Scanner keyboard = new Scanner(System.in);

   .......
   ......
   intSomething = keyboard.nextInt();
   doubleSomething = keyboard.nextDouble();

// I just want to get a string of input but I can't do this

   stringSomething = keyboard.nextString();

// So do I have to do a charSomething = keyboard.nextChar(); and use a loop to make my string. I haven't tried it yet because it would seem to me the class would have string handling implemented someway, and I just don't know how to go about finding out what the methods are.

Thanks for putting up with my stupid Noob questions   :)


Steve
New to Mac w/Mac Pro
New to Java w/Wrox 'Beginning Java 2'



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.