Java Software Developer Interview Questions

4,195 java software developer interview questions shared by candidates

in 1st coding round There is an array of elements and you have to print the result after removing continuous same elements. Ex -> [tom , jerry, jerry, tom] Output -> [] Ex -> [tom, jerry, jerry, tom, tom, jerry, tom] [tom jerry Jerry tom ] output-> [] [tom jerry Jerry tom jerry tom] op= [Jerry tom ] 2nd ques Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where 1 <= index1 < index2 <= numbers.length. ex -> Input: numbers = [2,7,11,15], target = 9 Output: [1,2] Ex -> [-1, 0] target = -1 Output -> [1, 2
avatar

Software Engineer II SDE2 Java Backend

Interviewed at HashedIn by Deloitte

4
Feb 4, 2022

in 1st coding round There is an array of elements and you have to print the result after removing continuous same elements. Ex -> [tom , jerry, jerry, tom] Output -> [] Ex -> [tom, jerry, jerry, tom, tom, jerry, tom] [tom jerry Jerry tom ] output-> [] [tom jerry Jerry tom jerry tom] op= [Jerry tom ] 2nd ques Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where 1 <= index1 < index2 <= numbers.length. ex -> Input: numbers = [2,7,11,15], target = 9 Output: [1,2] Ex -> [-1, 0] target = -1 Output -> [1, 2

methods Mapping in hibernate How to port server Which server use in your current project First level cache and second level cache How to create custom Exception Difference between throw and throws keywords Difference between Left joiners Primary key and foreign key Transection management Annotations Wait and sleep method use Difference between array and array list Difference between hashset and hashmap Difference between JPA and Hibernate Why to use native query In hibernate native query use or not @pathvariable Annotations
avatar

Software Engineer - Java Developer

Interviewed at Tech Mahindra

3.4
Feb 8, 2024

methods Mapping in hibernate How to port server Which server use in your current project First level cache and second level cache How to create custom Exception Difference between throw and throws keywords Difference between Left joiners Primary key and foreign key Transection management Annotations Wait and sleep method use Difference between array and array list Difference between hashset and hashmap Difference between JPA and Hibernate Why to use native query In hibernate native query use or not @pathvariable Annotations

1. How Java memory works 2. What we get NullPointerException 3. Program to get factorial using iteration and recursion(discussion around edge case writing code etc.) 4. Explain Volatile, Synchronized &amp; AtomicInteger 5. Why use kafka vs SQS 6. Performance optimization

Senior Software Engineer - JAVA

Interviewed at STG Labs

4.5
Jun 8, 2026

1. How Java memory works 2. What we get NullPointerException 3. Program to get factorial using iteration and recursion(discussion around edge case writing code etc.) 4. Explain Volatile, Synchronized &amp; AtomicInteger 5. Why use kafka vs SQS 6. Performance optimization

Viewing 1231 - 1240 interview questions

Glassdoor has 4,195 interview questions and reports from Java software developer interviews. Prepare for your interview. Get hired. Love your job.