himanshu.walia@gmail.com is on a distinguished road

himanshu.walia@gmail.com himanshu.walia@gmail.com is offline

Member

Visitor Messages

Showing Visitor Messages 1 to 1 of 1
  1. Najeeb
    01-26-2010 05:59 PM - permalink
    Najeeb
    How to convert String s="A" to integer.

    I have written this code as
    String s="A";
    int a=Integer.parseInt(s);
    System.out.print(a);

    at run time it give such massge which I am pasting here below;
    Exception in thread "main" java.lang.NumberFormatException: For input string: "A"
    at java.lang.NumberFormatException.forInputString(Unk nown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    plz give me guidence what should I do for this problem. Thanks

Statistics

Total Posts
Visitor Messages
General Information
  • Last Activity: 01-25-2010 12:23 PM
  • Join Date: 01-25-2010
  • Referrals: 0

All times are GMT +2. The time now is 05:03 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org