new Double(double value)
/* * Output: 3.14159 = 3.14159 -> true * */ public class MainClass { public static void main(String args[]) { Double d1 = new Double(3.14159); Double d2 = new Double("314159E-5"); System.out.println(d1 + " = " + d2 + " -> " + d1.equals(d2)); } }