Can't convert from String to Long.
807603Sep 9 2007 — edited Nov 27 2007Hi,
I want to convert a String to Long type but i am getting NumberFormatException while converting.
My code is:
Long ln1 = new Long(ln.trim());
where ln is a String.
I tried several ways like first convertig String to long and then Long but then it throws same exception ans the ln1 value gets set to null.
The String seems to be perfect with no spaces etc at the end. Can anybody help me with this. This is quite urgent.
Thanks