Results 1 to 5 of 5

Thread: Help needed

  1. #1
    radhi16 is offline Member
    Join Date
    Jan 2011
    Posts
    30
    Rep Power
    0

    Default Help needed

    Ask the user to enter the roll number.The roll number has to begin with IAD followed by some number
    Example
    IAD 123
    I have to store only the number.
    Here is the code which i have written so far
    Java Code:
    String rollNumber;
    Scanner scan = new Scanner(System.in);
     System.out.print("Enter the Roll Number");
    how should i continue.Any help

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default

    Scanner (Java Platform SE 6)

    See my signature.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    user0 is offline Senior Member
    Join Date
    Dec 2010
    Posts
    100
    Rep Power
    0

    Default

    Quote Originally Posted by radhi16 View Post
    Ask the user to enter the roll number.The roll number has to begin with IAD followed by some number
    Example
    IAD 123
    I have to store only the number.
    Here is the code which i have written so far
    Java Code:
    String rollNumber;
    Scanner scan = new Scanner(System.in);
     System.out.print("Enter the Roll Number");
    how should i continue.Any help
    Is this related to your two earlier threads?

    need help with 2D array

    How to test whether the entered value is numeric or it contains some characters.

    Why are you creating 3 threads for the same assignment? Want more people to take a look at your assignment at the same time?

    If you had taken some time to read the links given to you by Kevin and myself earlier, and read the exemplar code I gave, you should have been able to figure this out. Re-typing your assignment here and hoping someone will give you the code is not the way to learn Java - remember this forum exists to learn, not copy-paste.

    Good luck.
    --user0--

  4. #4
    radhi16 is offline Member
    Join Date
    Jan 2011
    Posts
    30
    Rep Power
    0

    Default

    I am sorry .I don't have any intention in getting the answers from others,i am just trying to get help from others.I have just learning java and i want to learn it.

  5. #5
    JavaHater is offline Senior Member
    Join Date
    Dec 2010
    Posts
    165
    Rep Power
    4

    Default

    Quote Originally Posted by radhi16 View Post
    Ask the user to enter the roll number.The roll number has to begin with IAD followed by some number
    Example
    IAD 123
    I have to store only the number.
    Here is the code which i have written so far
    Java Code:
    String rollNumber;
    Scanner scan = new Scanner(System.in);
     System.out.print("Enter the Roll Number");
    how should i continue.Any help
    I have seen your other threads. The people have shown you how to use next() or nextLine(). Try to use them to get the number.

Similar Threads

  1. Help needed!
    By decoy in forum New To Java
    Replies: 2
    Last Post: 10-06-2010, 01:14 PM
  2. help needed
    By 99w210 in forum New To Java
    Replies: 1
    Last Post: 03-08-2010, 05:53 AM
  3. a little help needed..
    By litojs in forum New To Java
    Replies: 1
    Last Post: 11-16-2008, 07:12 PM
  4. Help needed.
    By necro-1000 in forum AWT / Swing
    Replies: 2
    Last Post: 01-12-2008, 11:37 AM
  5. Help Needed
    By pks in forum New To Java
    Replies: 1
    Last Post: 01-09-2008, 12:07 AM

Posting Permissions

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