Integer: parseInt(String stringValue) : Integer « java.lang « Java by API
- Java by API
- java.lang
- Integer
Integer: parseInt(String stringValue)
/*
* Output:
Sum is 8
*/
public class MainClass {
public static void main(String args[]) {
int i = Integer.parseInt("3");
int j = Integer.parseInt("5");
int sum = i + j;
System.out.print("Sum is " + sum);
}
}
Related examples in the same category