The 10 most frequently-asked Java interview questions, in my experience.
Mostly used in phone interviews to “weed out” the weakest candidates.
These questions are fairly simple so getting them wrong will raise a major red flag.
In no particular order:
– How to prevent concurrent access to a method
– Meaning of the volatile keyword
– Difference String and StringBuffer
– Difference between ArrayList and Vector
– Relationship between equals and hashcode
– Difference between checked and unchecked exceptions
– Meaning of the final keyword
– Explain garbage collection, can it be forced
– Difference between an interface and a abstract class
– what’s a deadlock