Java examples for Language Basics:long
Convert long primitive to Long object
public class Main { public static void main(String[] args) { long i = 10;/*from ww w. j a va2s . co m*/ /* Use Long constructor to convert long primitive type to Long object. */ Long lObj = new Long(i); System.out.println(lObj); } }