Interview Questions

Java Software Engineer Interview Questions


Java Software Engineers are responsible for designing and developing software applications using the Java programming language. Working with web developers and other software engineers, Java Software engineers are involved in every stage of the development life cycle from the initial design, through to final testing.

Whether you're a job seeker preparing to be interviewed for the role of Java Software Engineer or an employer preparing to interview candidates for Java Software Engineer position, these Java Software Engineer interview questions will help you prepare yourself for the job interview session.

Java Software Engineer Interview Questions

Below are a list of some skill-based Java Software Engineer interview questions.

  1. What Java-based software applications did you develop in your previous job?
  2. How would you define the user requirements for a new software application?
  3. Is Java a statically or dynamically typed language?
  4. Do arguments in Java get passed by reference or by value?
  5. What is the difference between an abstract class and an interface and when would you use one over the other?
  6. What is the difference between a static and a dynamic method invocation?
  7. What is a factory pattern and how would you implement the Singleton pattern?
  8. Do you have experience using Java frameworks? If so, which ones?
  9. What is the difference between “==” and equals(…) method? What is the difference between shallow comparison and deep comparison of objects?
  10. Explain the concept of garbage collection in java?
  11. How is Java SE related to Java EE?
  12. Explain JDK, JRE and JVM?
  13. Explain public static void main(String args[]) in Java.
  14. What are constructors in Java?
  15. What is the difference between Array list and vector in Java?
  16. What is the difference between an array and an array list?
  17. What is a Map in Java?
  18. When can you use the super keyword?
  19. What makes a HashSet different from a TreeSet?
  20. What are the differences between HashMap and HashTable in Java?
  21. What is the importance of reflection in Java?
  22. How are Runtime exceptions different from Checked exceptions?
  23. Can you call a constructor of a class inside another constructor?
  24. How is the creation of a String using new() different from that of a literal?
  25. Why is synchronization necessary? Explain with the help of a relevant example.
  26. What are the differences between Heap and Stack Memory in Java?
  27. What is a package in Java? What are the various advantages of packages?
  28. What is JIT compiler in Java?
  29. What are access modifiers in Java? Give examples.
  30. Define a Java Class.
  31. What is Object Oriented Programming?
  32. What is the difference between a local variable and an instance variable?
  33. Differentiate between the constructors and methods in Java?
  34. What is final keyword in Java?
  35. What is the difference between break and continue statements?
  36. What is an infinite loop in Java? Explain with an example.
  37. What is the difference between this() and super() in Java?
  38. What is a classloader in Java?
  39. What is Polymorphism?
  40. What is abstraction in Java?
  41. What is the difference between abstract classes and interfaces?
  42. What is inheritance in Java?
  43. What are the different types of inheritance in Java?
  44. What is method overloading and method overriding?
  45. Can you override a private or static method in Java?
  46. What is a servlet?
  47. What is Request Dispatcher?
  48. What are the differences between forward() method and sendRedirect() methods?
  49. Describe the life-cycle of a servlet?
  50. How does cookies work in Servlets?
  51. What are the differences between ServletContext vs ServletConfig?
  52. What are the different methods of session management in servlets?
  53. What is JDBC Driver?
  54. What are the steps to connect to a database in java?
  55. What is the role of JDBC DriverManager class?
  56. What is JDBC Connection interface?
  57. What is the purpose of JDBC ResultSet interface?
  58. What is JDBC ResultSetMetaData interface?
  59. What is JDBC DatabaseMetaData interface?
  60. What do you mean by batch processing in JDBC?
  61. What is the difference between execute, executeQuery, executeUpdate?
  62. What do you understand by JDBC Statements?
  63. Do you have experience using the Spring Framework or Hibernate Framework?
  64. What are the life-cycle methods for a jsp?
  65. What are the different tags provided in JSTL?
  66. How is JSP better than Servlet technology?
  67. Why should we not configure JSP standard tags in web.xml?
  68. Provide an example of a time when you had to troubleshoot a bug in your code.
  69. Choose a Java EE platform API and give a short description of it.
  70. In a 3-tier application running a Java application server you notice freezes for several seconds during high load. What are the most likely reasons? How would you troubleshoot them?
  71. Servlets 3.0 introduced async support. Describe a use case for it.
  72. What would you do if you were assigned to work on a project you had no prior experience with?
  73. Why do you think lambda expressions are considered such a big thing for Java 8?
  74. Is this possible in Java? "A extends B, C"
  75. What do you think sets Java apart from other programming languages?
  76. What's your favourite IDE?
  77. How do you reverse a string in Java?
  78. Write a Java program for the Fibonacci series.
  79. Write a Java program to show scroll up and scroll down.
  80. Write a Java program to reverse a string without using string inbuilt function.
  81. What makes you stand out from other Java software engineers in this interview?

Java Software Engineer Interview Questions and Answers

Every interview is different and the questions may vary. However, there are lots of general questions that get asked at every interview.

Below are some common questions you'd expect during Java Software Engineer interviews. Click on each question to see how to answer them.

  1. Why Do You Want This Job?
  2. What is Your Greatest Weakness?
  3. Are You a Leader or a Follower?
  4. What Is Your Greatest Accomplishment?
  5. Do You Have Any Questions for Us?
  6. What is Your Salary Expectation?
  7. Why Do You Want To Leave Your Current Job?
  8. What is Your Greatest Strength?
  9. Tell Me About Yourself
  10. Why Should We Hire You?