Java Senior Interview Questions

6,028 java senior interview questions shared by candidates

1. What is runtime polymorphism? Can you explain by writing and example ? 2. Developer d = new Employee(); Here employee is a super class and Developer is a subclass. If we can d.work(); which method will be executed? 3. Can we overload static methods ? 4. In the below array, move all the 0 to left and don't sort the remaining values: 3, 23,0,4,6,0,33,0,34 5. Reverse each string in the word and don't move the punctuations: "Hello, This is a String!" 6. What does a collision happen in Hashmap ? 7. What are different ways to create Thread ?? 8. What is the difference between synchronized block and synchronised method ?? Which is better with respect to performance? 9. If we have static block, a constructer and main method. What is the order of execution? 10. What are the design patterns that you have used in your project? 11. Can you write a program to display singleton design patterns? 12. What are the solid principles?
avatar

Senior Java Engineer

Interviewed at Quest Global

3.9
May 13, 2025

1. What is runtime polymorphism? Can you explain by writing and example ? 2. Developer d = new Employee(); Here employee is a super class and Developer is a subclass. If we can d.work(); which method will be executed? 3. Can we overload static methods ? 4. In the below array, move all the 0 to left and don't sort the remaining values: 3, 23,0,4,6,0,33,0,34 5. Reverse each string in the word and don't move the punctuations: "Hello, This is a String!" 6. What does a collision happen in Hashmap ? 7. What are different ways to create Thread ?? 8. What is the difference between synchronized block and synchronised method ?? Which is better with respect to performance? 9. If we have static block, a constructer and main method. What is the order of execution? 10. What are the design patterns that you have used in your project? 11. Can you write a program to display singleton design patterns? 12. What are the solid principles?

1) Explain about microservices architecture 2.Give brief explanation about API Gateway configuration 3. What is the role of service registry and which registry have you used in your application 4. How you handle authentication and Authorization in your microservices 5. How to communicate each microservices one to another 6. How you create one microservices from scratch 7. What is meant by stereotype annotation and explain it 8. Transactional annotation which purpose you used in your application 9. Explain about concurrent Hashmap and explain about internal working structure 10. Lifecycle of maven 11. Do you have any idea about Docker and Kubernetes.. Coding: Some Java streams snippet questions is related to strings and number logic
avatar

Senior Java Developer

Interviewed at Cognizant

3.1
Nov 25, 2025

1) Explain about microservices architecture 2.Give brief explanation about API Gateway configuration 3. What is the role of service registry and which registry have you used in your application 4. How you handle authentication and Authorization in your microservices 5. How to communicate each microservices one to another 6. How you create one microservices from scratch 7. What is meant by stereotype annotation and explain it 8. Transactional annotation which purpose you used in your application 9. Explain about concurrent Hashmap and explain about internal working structure 10. Lifecycle of maven 11. Do you have any idea about Docker and Kubernetes.. Coding: Some Java streams snippet questions is related to strings and number logic

Viewing 1691 - 1700 interview questions

Glassdoor has 6,028 interview questions and reports from Java senior interviews. Prepare for your interview. Get hired. Love your job.