Results 1 to 2 of 2
- 09-27-2009, 08:57 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 50
- Rep Power
- 0
Taking args consisting of a scanner input
Can a set method be coded like this
Scanner input = new Scanner(System.In);
String userName = input.next();
setName(userName){
name = userName;}
or how would I assign that input to an object, along with score or timePlayed in a game so that I can sort the players results?
-
Similar Threads
-
while loop bypasses scanner input on 2nd pass
By xf021209 in forum New To JavaReplies: 2Last Post: 02-28-2010, 08:10 AM -
Scanner Issues (User Input: Very Simple)
By carlodelmundo in forum New To JavaReplies: 8Last Post: 10-31-2008, 02:44 AM -
Scanner input problem
By slayer_azure in forum New To JavaReplies: 3Last Post: 05-26-2008, 10:49 PM -
Taking input from Properties File
By bugger in forum New To JavaReplies: 4Last Post: 05-07-2008, 09:30 AM -
Taking input from console
By Java Tip in forum Java TipReplies: 0Last Post: 11-05-2007, 04:47 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks