0
Whenever I run int it says type mismatch: cannot convert from string to int
I m kind of new so plz
3 Respuestas
+ 3
You are assigning String value to int. You can't type cast String to int.
If you want to write like this.
int x=Integer. parseInt("58");
+ 1
use Integer wrapper class to get int from string
for eg
int a = Integer.parseInt("your_string");
check out more wrapper classes at
javamidpoint.wordpress.com
0
tq