java how to cast to int from string code example
Example 1: string to int java
int result = Integer.parseInt(number);
Example 2: string to int java
String number = "10";
int result = Integer.parseInt(number);
System.out.println(result);
Copy