Java Software Developer Interview Questions

4,199 java software developer interview questions shared by candidates

Codility: 1. Nails and hammer problem: review code and make max 4 fixes. Hammer down at most K nails (maximize the n of nails that end up having the same length) 2. Remove adjacent pairs (a/b and c/d): CBACD -> CBA -> C 3. Binary reduction to zero: if v is odd, subtract 1, if even, divide it by 2 n of operations? 011100 (28) -> 11100 (28) -> 14 -> 7 -> 6 -> 3 -> 2 -> 1 -> 0 (7ops) Technical Interview Questions: 1. Refactoring a Java code snippet: encapsulation, structure, alternative designs. 2. Discussing API usage: which requests to use, sending data in GET requests. 3. Scalability considerations: handling multiple requests, caching, load balancing. 4. Handling nested conditionals and improving code readability. 5. Explaining your approach, thought process, and code decisions throughout the exercises. Behavioral / Situational Questions: 1.Describe a time a colleague raised a concern about your work and how you addressed it. 2.Explain a situation where you introduced a bug and how you identified and resolved it. 3. Share an example of a challenging situation and how you managed it.
avatar

Java Software Engineer

Interviewed at Sonar

2.9
Nov 12, 2025

Codility: 1. Nails and hammer problem: review code and make max 4 fixes. Hammer down at most K nails (maximize the n of nails that end up having the same length) 2. Remove adjacent pairs (a/b and c/d): CBACD -> CBA -> C 3. Binary reduction to zero: if v is odd, subtract 1, if even, divide it by 2 n of operations? 011100 (28) -> 11100 (28) -> 14 -> 7 -> 6 -> 3 -> 2 -> 1 -> 0 (7ops) Technical Interview Questions: 1. Refactoring a Java code snippet: encapsulation, structure, alternative designs. 2. Discussing API usage: which requests to use, sending data in GET requests. 3. Scalability considerations: handling multiple requests, caching, load balancing. 4. Handling nested conditionals and improving code readability. 5. Explaining your approach, thought process, and code decisions throughout the exercises. Behavioral / Situational Questions: 1.Describe a time a colleague raised a concern about your work and how you addressed it. 2.Explain a situation where you introduced a bug and how you identified and resolved it. 3. Share an example of a challenging situation and how you managed it.

Viewing 1841 - 1850 interview questions

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