user69514
user69514

Reputation: 27629

Java wrapper classes. Casting

Is there a name for when you convert a primitive to an object using wrapper classes? Im assuming this is also called casting correct?

Upvotes: 2

Views: 1117

Answers (1)

fastcodejava
fastcodejava

Reputation: 41097

This is called autoboxing. E.g.

Integer i = 5;   // i is an object but has a primitive value. 

Upvotes: 5

Related Questions