Java Long to Double longToDouble(long d)

Here you can find the source of longToDouble(long d)

Description

long To Double

License

Apache License

Declaration

public static double longToDouble(long d) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double longToDouble(long d) {
        double lo = 0;
        try {//w  w w  .  j  a v a 2 s. co  m
            lo = Double.parseDouble(String.valueOf(d));
        } catch (Exception e) {
            lo = 0;
        }
        return lo;
    }
}

Related

  1. longToDouble(final long value)
  2. longToDouble(long[] array)
  3. longToDouble(long[] values)