View Single Post
  #1 (permalink)  
Old 01-26-2008, 07:18 PM
cew27 cew27 is offline
Member
 
Join Date: Dec 2007
Posts: 13
cew27 is on a distinguished road
how to use Scanner with a number
right im just trying to make simple text program here and have a few questions
how can i make it so the below statements refers to a number rather than a string?
Scanner myScanner = new Scanner(in);
String choice = myScanner.next();
a few more n00b questions
1. is there anyway to make it so that i can if an if statement that has 2 acceptable options or more e.g. if string = "hello" or "hello " or " hello"
just to help with human error
2. what is the difference between == and .equals?
3. what hold the largest amount of numbers double or long (or any other that i don't know about)
your help is much appreciated
Reply With Quote
Sponsored Links