Lockheed Martin Interview Question: In Java 1.6, what is autoboxi... | Glassdoor

Interview Question

Software Engineer Interview Denver, CO

In Java 1.6, what is autoboxing? When does it occur?

Answer

Interview Answer

1 Answer

0

Autoboxing automatically casts from primitive data types to their object wrappers and back. It occurs at runtime - I said I was like 80-90% sure on that, but I'd want to look it up before I put money on it. There were only a couple of cases I could think of when it couldn't happen at compile time, and I wasn't sure if they really mattered. The interviewer said that was a good answer.

Interview Candidate on Aug 16, 2010

Add Answers or Comments

To comment on this, Sign In or Sign Up.