Mihai Surdeanu

(#9) Tricky Java Questions for Interviews

Q1: Let’s suppose you have an Optional object. What’s the difference between calling orElseGet and orElse on it? Can you provide a concrete situation when orElseGet is much better?

Q2: Why Java is not 100% considered an object oriented programming language?

Q3: Why in Java is recommended to have methods with maximum 10 lines of code and in C is recommended to not have too many small methods due to stack call overhead? There is no performance issue in Java when you have too many small methods?


Pasionat de IT. Pasionat de viață. Pasionat de tot ceea ce înseamnă a face o viață mai bună, plină de înțelegere, ajutor reciproc și iubire de aproape.

Adaugă comentariu


Arhiva personală