java int to long code example
Example 1: 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);
}
}
Example 2: int to long java
Long l= new Long(i); //first way
Long l2=Long.valueOf(i); //second way
Example 3: int to long java
(long) intValue;