Java Programmer Interview Questions

26,902 java programmer interview questions shared by candidates

In the Java specification, it is considered good practice to override .equals() and .hashCode() both together. In the context of HashMap, explain why implementing only one of the two instead of both can cause problems. You must consider both cases.
avatar

Java Software Developer

Interviewed at IMC Trading

4.1
Apr 18, 2015

In the Java specification, it is considered good practice to override .equals() and .hashCode() both together. In the context of HashMap, explain why implementing only one of the two instead of both can cause problems. You must consider both cases.

1. Group people by name, age in using stream api, eg: [{ram, 29}, {kim.29}, {sandy,30}, {mark,34},{lisa,34},{steve,25} ] 2. using java write a program to make the 0 in left side and 1 in right side, an array of mixed value of 0s, 1s
avatar

Software Engineer - Java

Interviewed at Eyepax IT Consulting

3.3
Jul 8, 2025

1. Group people by name, age in using stream api, eg: [{ram, 29}, {kim.29}, {sandy,30}, {mark,34},{lisa,34},{steve,25} ] 2. using java write a program to make the 0 in left side and 1 in right side, an array of mixed value of 0s, 1s

Viewing 911 - 920 interview questions

Glassdoor has 26,902 interview questions and reports from Java programmer interviews. Prepare for your interview. Get hired. Love your job.