Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
added 31 characters in body
Source Link
krock

This is called Autoboxing which is a feature. That that was added in Java 5 to. It will automatically convert between primitive types and the wrapper types such as double (the primitive) and java.lang.Double (the object wrapper). The java compiler automatically transforms thatthe line:

Double d = 5.1;

into:

Double d = Double.valueOf(5.1);

This is called Autoboxing which is a feature. That was added in Java 5 to automatically convert between primitive types and the wrapper types such as double (the primitive) and java.lang.Double (the object wrapper). The java compiler automatically transforms that line into:

Double d = Double.valueOf(5.1);

This is called Autoboxing which is a feature that was added in Java 5. It will automatically convert between primitive types and the wrapper types such as double (the primitive) and java.lang.Double (the object wrapper). The java compiler automatically transforms the line:

Double d = 5.1;

into:

Double d = Double.valueOf(5.1);
Source Link
krock

This is called Autoboxing which is a feature. That was added in Java 5 to automatically convert between primitive types and the wrapper types such as double (the primitive) and java.lang.Double (the object wrapper). The java compiler automatically transforms that line into:

Double d = Double.valueOf(5.1);
lang-java