Last day I faced an interview and they asked me java questions among which for some questions I didn't know the answer. I am curious to know the answer for that question. Interviewer did not tell me the answer. I am asking that questions here:
- Does Java provide any construct to find out the size of an object?
- Give a simplest way to find out the time a method takes for execution without using any profiling tool?
- What are checked exceptions and runtime exceptions?
- If I write return at the end of the try block, will the finally block still execute?
- If I write System.exit (0); at the end of the try block, will the finally block still execute?
Want to know answers of above question so that it can help me next time.
Explanations, notes, and/or relevant links to the specification would be greatly appreciated over just the simple answers -- and what is a good way to learn this stuff?