Hero Image
- Mihai Surdeanu

(#11) Tricky Java Questions for Interviews

Motto: Bring Spring to next level...

Q1: What is escape analysis in Java and how this optimization technique helps to reduce memory footprint?

Q2: A class implements AutoCloseable. It’s possible to use an instance of this class in a try-with-resources (feature introduced in Java 7) ?

Q3: Let’s say one method receives one parameter – a String. Why is better from coding style perspective to put final to this input parameter?

Hint: Think about how objects are passed as parameters in Java (by reference or by value).

Other Related Posts:

Comments:

Blog Comments powered by Disqus.