java.lang.Double.longValue()


java.lang.Double.longValue()

package com.codingdict;



import java.lang.*;



public class DoubleDemo {



   public static void main(String[] args) {



      /* returns the double value represented by this object

         converted to type long */

      Double obj = new Double("543267.90");

      long l = obj.longValue();

      System.out.println("Value = " + l);



      obj = new Double("30.0");

      l = obj.longValue();

      System.out.println("Value = " + l);

   }

}