int to long java

Java
Long l= new Long(i); //first way
Long l2=Long.valueOf(i); //second way
Source

Also in Java: