1. Can you solve the Two Sum array problem?
Follow-up: “What approach will you use (two-pointer, hashing, brute-force)?”, “How will you handle multiple pairs or edge cases?”
2. For each element in an array, can you find the nearest greater number to the right? If none exists, return -1.
3. What are the four pillars of OOP?
4. Can you explain different types of inheritance in Java?
5. What is the difference between StringBuffer and StringBuilder?
6. What is the difference between Thread and Runnable?”
7. How do you avoid or resolve a deadlock in Java?
8. What is the Serializable interface used for in Java?