2

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

1
  • In .NET, it is referred to as 'boxing' and converting an object to a value type is called 'unboxing.' Commented Feb 25, 2010 at 1:04

1 Answer 1

5

This is called autoboxing. E.g.

Integer i = 5;   // i is an object but has a primitive value. 
Sign up to request clarification or add additional context in comments.

1 Comment

you're right. i learned it before i just forgot the name thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.