Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- /*
- * Convert long primitive to Long Object example. Program to convert Java
- * long primitive data type to Long object.
- */
- public class LongPrimitiveToLong {
- public static void main(String args[]){
- //new long primitive
- long l = 1233243243l;
- //Use Long(long l) constructor
- Long lObj = new Long(l);
- System.out.println("long primitive converted to Long: " + lObj);
- }
- }

Post new comment