When to use ?
Deal all,
Please tell me that when (the particular situation) the boxing and unboxing concept is used? Although I know the boxing and undoxing.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
nagabhushan hegde26 reputationPosted Mar 8, 2006, 5:31 AM EST
Ok. Coming to the topic, boxing is nothing but implicit conversion of data types. It happens in compile time and we do not worry much about it. Unboxing is a concept where in we explicitly cast a variable of some other data type to our desired type. This also happens during compile time.
Normally there is no situation where in you search for these kind of situations. It's by default ( Boxing). and Unboxing as said concept name given to type cast for variables.
Thnx,
nagabhushan hegde26 reputationPosted Mar 8, 2006, 5:31 AM EST
Ok. Coming to the topic, boxing is nothing but implicit conversion of data types. It happens in compile time and we do not worry much about it. Unboxing is a concept where in we explicitly cast a variable of some other data type to our desired type. This also happens during compile time.
Normally there is no situation where in you search for these kind of situations. It's by default ( Boxing). and Unboxing as said concept name given to type cast for variables.
Thnx,