A
ashish.lohra
Hello,
I'm am working on converting a String "596" (I'm reading it from a txt
file) to an integer using parseInt() however I get
NumberFormatException for the input string : "596". I tried to use
trim() method before using parseInt on the String but still doens't
work.
Also, I tried to get the length of the input string "596" which I read
from the file and the length comes out to be 7. How did that happen? I
thought the length should be 3.
Please advise.
AL
I'm am working on converting a String "596" (I'm reading it from a txt
file) to an integer using parseInt() however I get
NumberFormatException for the input string : "596". I tried to use
trim() method before using parseInt on the String but still doens't
work.
Also, I tried to get the length of the input string "596" which I read
from the file and the length comes out to be 7. How did that happen? I
thought the length should be 3.
Please advise.
AL