string a int java

Java
String number = "1"
int num = Integer.parseInt (name);
//num equals 1
Source

Also in Java: