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 to long primitive example. Program to convert Java
- * Long object to long primitive data type.
- */
- public class LongToLongPrimitive {
- public static void main(String args[]){
- //new Long object
- Long lObj = new Long("12332443252");
- //to convert Long to long use longValue method of Long wrapper class
- long l = lObj.longValue();
- System.out.println("Long converted to long: " + l);
- }
- }

Post new comment