Java Developer Interviews

Java Developer Interview Questions

In your interview for a java developer position, be prepared to answer technical questions that test your understanding of Java basics. Interviewers may also ask open-ended questions to assess your coding and problem-solving abilities. Prepare for non-technical questions that focus on time management, interpersonal communication, and work ethic.

Top Java Developer Interview Questions & How to Answer

Question 1

Question #1: What is the difference between HashTable and HashMap in Java?

How to answer
How to answer: Interviewers use technical questions to assess your formal training and understanding of the Java programming language. Use your answer to demonstrate your communication skills. Even if you have been coding for some time, it can be helpful to review Java basics before your interview.
Question 2

Question #2: Write a program to determine if 243 is an Armstrong number.

How to answer
How to answer: Interviewers use open-ended questions to test your coding skills. This question allows the employer to assess your ability to solve a problem using a Java algorithm. Explain your thinking process as you use a code editor or whiteboard to solve the problem.
Question 3

Question #3: How do you produce quality code when you have several Java projects to complete at once?

How to answer
How to answer: Java developers often juggle multiple projects at the same time. Interviewers use questions such as this to test your time management and organizational skills. Employers are also trying to assess your commitment to quality work. If you have experience as a developer, include examples from your work history that demonstrate high-quality work and effective time management.

30,830 java developer interview questions shared by candidates

There is a group of n people. A serial killer comes and kills every kth person from the group and keeps on repeating this until there is only one person left and he spares the life of that person. Write an equation/algorithm which takes n and k as input and give the position of the guy who will be alive after the complete process. For eg: Let us assume there is a group of 13 (n) people and the serial killer kills every 3rd (k) person. The positions on which they are standing are marked 1 to 13. The order in which he kills will be: 3, 6, 9, 12, 2, 7, 11, 4, 10, 5, 1, 8. This way the guy on 13th positon will be saved.
avatar

Java Consultant

Interviewed at Xebia

3.8
Mar 5, 2016

There is a group of n people. A serial killer comes and kills every kth person from the group and keeps on repeating this until there is only one person left and he spares the life of that person. Write an equation/algorithm which takes n and k as input and give the position of the guy who will be alive after the complete process. For eg: Let us assume there is a group of 13 (n) people and the serial killer kills every 3rd (k) person. The positions on which they are standing are marked 1 to 13. The order in which he kills will be: 3, 6, 9, 12, 2, 7, 11, 4, 10, 5, 1, 8. This way the guy on 13th positon will be saved.

The questions I was asked are as follows :- 1. Difference between pass by value and pass by reference 2. Finding the largest number in an array 3. How would you test a Lamp ? 5. How would you test a Twitter application ? 6. Find a missing number in an array of sorted numbers. 7. What are primitive types and non primitives types. 8. How would you test a Restful Web Service
Sep 17, 2013

The questions I was asked are as follows :- 1. Difference between pass by value and pass by reference 2. Finding the largest number in an array 3. How would you test a Lamp ? 5. How would you test a Twitter application ? 6. Find a missing number in an array of sorted numbers. 7. What are primitive types and non primitives types. 8. How would you test a Restful Web Service

Viewing 321 - 330 interview questions

Glassdoor has 30,830 interview questions and reports from Java developer interviews. Prepare for your interview. Get hired. Love your job.