Source Code:
public class P18 {
public static void main(String[] args) {
String s = “123”;
int n = Integer.parseInt(s);
System.out.println(n);
}
}
Output:
public class P18 {
public static void main(String[] args) {
String s = “123”;
int n = Integer.parseInt(s);
System.out.println(n);
}
}