In Double object documentation it only have two constructors, one taking a double value and one taking a string value. However, I just found that if we initialize it with other Number type objects it will also work. For example the following code will work:
Integer i = Integer.valueOf(10);
Double d1 = new Double(i);
Long l = Long.valueOf(100);
Double d2 = new Double(l);
So I'm wondering what's behind that? Autoboxing/unboxing would do the conversion between Double/double, Long/long and Integer/int, but I don't see why the constructor of Double will take other data types.