Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Getting Error" Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "age"

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Getting Error" Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "age"

    Hi, I'm getting this error when I run my Java code:

    Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "age"

    The code that shows this error is:

    Integer age = Integer.parseInt(stringTokenizer.nextElement().toS tring())

    Can someone help me find this error? Thank you


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,684
    Thanks
    25
    Thanked 333 Times in 309 Posts

    Default Re: Getting Error" Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "age"

    The word: "age" is not a number, so you cannot parse it into an integer.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  3. #3
    Junior Member
    Join Date
    Jun 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Getting Error" Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "age"

    Ohh so what should i do? But the age should be integer right?

    btw thank you for your reply

Similar Threads

  1. Replies: 6
    Last Post: March 21st, 2013, 06:43 AM
  2. Replies: 2
    Last Post: November 24th, 2012, 08:18 AM
  3. Replies: 3
    Last Post: December 7th, 2011, 01:03 AM
  4. Replies: 7
    Last Post: August 13th, 2011, 01:22 AM
  5. Replies: 1
    Last Post: January 15th, 2010, 12:32 AM