Java Engineer Interview Questions

27,775 java engineer interview questions shared by candidates

Company for some reason makes a strong accent on concurrency initially. I was asked to create a load balancer with the production like code. You won't be given any requirements initially but only to implement the register method. Tried to clarify all the requirements ( target groups, healthchecks etc. ) From the interviwer answers I realized I shouldn't clarify requiments at this point. More requirements will be added added like capacity limitation and uniqueness check. why do you prefer register(String url) over register(URL url)? in what case the array list append won't be constant time? why it's not ready for prod ( concurrency ) what problems do you see? what's the simplest was to fix it? Didn't receive any feedback so it's hard to tell what was expected.
avatar

Senior Java Developer

Interviewed at Revolut

4
May 26, 2025

Company for some reason makes a strong accent on concurrency initially. I was asked to create a load balancer with the production like code. You won't be given any requirements initially but only to implement the register method. Tried to clarify all the requirements ( target groups, healthchecks etc. ) From the interviwer answers I realized I shouldn't clarify requiments at this point. More requirements will be added added like capacity limitation and uniqueness check. why do you prefer register(String url) over register(URL url)? in what case the array list append won't be constant time? why it's not ready for prod ( concurrency ) what problems do you see? what's the simplest was to fix it? Didn't receive any feedback so it's hard to tell what was expected.

1. OOps concepts with examples. 2. Write a java program to find the first duplicate in an array. 3. Write a java program to print the occurrences of each character. 4. Explain the approach to print middle element in a linked list. 5. Given a string str = "hfjsk6485lop", sort the string and print the characters first and print digits last. 6. Find a missing a element in an array. 7. Collection framework hierarchy. 8. Difference between abstract class and interface. 9. What is association and aggregation . 10. some code snippets to answer. 11. Internal working of a hash map, what is the case if two elements hash code is same. 12. What are the challenges that you faced in your projects how you have handled them. 13. Difference between string, stringBuffer, String builder. 14. Difference between final, finally, finalize. 15. Difference between Exception and Error. 16. Can you throw custom exception with Error Object. 17. Exception handling hierarchy.
avatar

Software Engineer - Java Developer

Interviewed at Siemens

4.1
Jul 9, 2021

1. OOps concepts with examples. 2. Write a java program to find the first duplicate in an array. 3. Write a java program to print the occurrences of each character. 4. Explain the approach to print middle element in a linked list. 5. Given a string str = "hfjsk6485lop", sort the string and print the characters first and print digits last. 6. Find a missing a element in an array. 7. Collection framework hierarchy. 8. Difference between abstract class and interface. 9. What is association and aggregation . 10. some code snippets to answer. 11. Internal working of a hash map, what is the case if two elements hash code is same. 12. What are the challenges that you faced in your projects how you have handled them. 13. Difference between string, stringBuffer, String builder. 14. Difference between final, finally, finalize. 15. Difference between Exception and Error. 16. Can you throw custom exception with Error Object. 17. Exception handling hierarchy.

Viewing 1421 - 1430 interview questions

Glassdoor has 27,775 interview questions and reports from Java engineer interviews. Prepare for your interview. Get hired. Love your job.