Convert string to a number in java
public class ConvertStringToInteger {
public static void main(String[] args) {
String number="123";
int num = Integer.parseInt(number);
System.out.println("Number="+num);
}
}
public class ConvertStringToInteger {
public static void main(String[] args) {
String number="123";
int num = Integer.parseInt(number);
System.out.println("Number="+num);
}
}
No comments:
Post a Comment