Check out example codes for "int to long java". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com