View Single Post
  #1 (permalink)  
Old 12-17-2007, 10:11 AM
eva eva is offline
Member
 
Join Date: Dec 2007
Posts: 49
eva is on a distinguished road
String to Integer conversion
I want to convert a string to integer. I wrote following code but it throws exception.

Code:
String str = "22"; int a = (int)str;
Exception:
Code:
Cannot cast from String to int
Can anyone indicate the problem area?

-PEACE
Reply With Quote
Sponsored Links