Home  >  Forum  >  Core Java
Post New Query

NumberFormatException : What is the problem in my java code?


joined on
October 13,2014
Asked on February 09,2015
public class MyLength {
public static void main(String[] args) {
String s= "THANKSGOD";
int i= Integer.parseInt(s);
}

}

joined on
March 15,2013
Replied on February 09,2015

would you please explain about your java code, what you want to do with it?


joined on
October 13,2014
Replied on February 09,2015

I want to count the length of my string...
joined on
March 15,2013
Replied on February 09,2015

Here NumberFormatException occur because you have a string variable and converting this variable into digit will occur NumberFormatException. 

Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us