java how to convert string to int

Java
	String number = "10";
	int result = Integer.parseInt(number);			
	System.out.println(result);
	String number = "10";
	int result = Integer.parseInt(number);			
	System.out.println(result);
Copyclass Scratch{
    public static void main(String[] args){
        String str = "50";
        System.out.println( Integer.parseInt( str ));   // Integer.parseInt()
    }
}
Source

Also in Java: