Mega Code Archive

 
Categories / Java / Data Type
 

Convert String to java int Example

public class Main {   public static void main(String[] args) {     String str = new String("10");     int i = Integer.parseInt(str);     System.out.println(i);   } }