Software Engineer Java Interview Questions

4,185 software engineer java interview questions shared by candidates

The first question was about a given number of items, and 2 types of packages, first one could carry 5 items and the second only 1 and the question was: What is the minimal number of packages required to carry all the items with given number of packages? So you actually had 3 parameters, the number of items, the number of large packages and small packages and you should have returned the minimal packages that could carry the items. If the packages were not enough to carry the items the function should return -1. There was a static function ready to populate.
avatar

Java Software Engineer

Interviewed at Travelfusion

3.3
Jul 10, 2024

The first question was about a given number of items, and 2 types of packages, first one could carry 5 items and the second only 1 and the question was: What is the minimal number of packages required to carry all the items with given number of packages? So you actually had 3 parameters, the number of items, the number of large packages and small packages and you should have returned the minimal packages that could carry the items. If the packages were not enough to carry the items the function should return -1. There was a static function ready to populate.

Second round technical interview had one string manipulation question that had to do with ordering a first string such as "banana" according to the character ordering of the second string like "bna" to output "bnnaaa."
avatar

Java Software Engineer Internship

Interviewed at 1stDibs.com

3.6
Apr 12, 2018

Second round technical interview had one string manipulation question that had to do with ordering a first string such as "banana" according to the character ordering of the second string like "bna" to output "bnnaaa."

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 101 - 110 interview questions

Glassdoor has 4,185 interview questions and reports from Software engineer java interviews. Prepare for your interview. Get hired. Love your job.