Interview Questions and Common Mistakes
OOP (object-oriented programming, building programs from objects that hold data and the code that works on it) questions come in clusters: abstract class against interface, overloading against overriding, == against equals, and whether Java passes by value (Java hands a copy of each value to a method). This section gives a spoken answer for each cluster and points to the section that explains the idea in full. It also corrects a few wrong answers.
After this section you can answer each cluster in under a minute, say what is Java-only, and name the rule that makes a common wrong answer wrong.
Topics in this section
- Abstract class, interface and concrete class
- Overloading, overriding and hiding
- Equality, hashCode and passing values
- Composition against inheritance
- Static, instance and final
- Other languages and wrong answers