optimalint to int java code example
Example 1: java strin to int
String myString = "1234";
int foo = Integer.parseInt(myString);
Example 2: java long to int
public class LongToIntExample2{
public static void main(String args[]){
Long l= new Long(10);
int i=l.intValue();
System.out.println(i);
}
}