Why does the following code compile?
if Double is a class, why am I able to assign the return value of test() to a double?
if Integer is a class, why am I able to pass just 12, and not "new Integer(12)"?
public static void main(String[] args) {
double x = test(12);
}
public static Double test(Integer a) {
a = 13;
return new Double(34.12);
}