Results 1 to 2 of 2
  1. #1
    Implode is offline Member
    Join Date
    Aug 2009
    Rep Power

    Default Taking args consisting of a scanner input

    Can a set method be coded like this
    Scanner input = new Scanner(System.In);

    String 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?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Similar Threads

  1. while loop bypasses scanner input on 2nd pass
    By xf021209 in forum New To Java
    Replies: 2
    Last Post: 02-28-2010, 09:10 AM
  2. Scanner Issues (User Input: Very Simple)
    By carlodelmundo in forum New To Java
    Replies: 8
    Last Post: 10-31-2008, 03:44 AM
  3. Scanner input problem
    By slayer_azure in forum New To Java
    Replies: 3
    Last Post: 05-26-2008, 11:49 PM
  4. Taking input from Properties File
    By bugger in forum New To Java
    Replies: 4
    Last Post: 05-07-2008, 10:30 AM
  5. Taking input from console
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-05-2007, 05:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts