Java Interview Questions


Following are the questions that can be asked to a java programmer during the interview.

  1. Explain what Byte Code is.
  2. Differentiate between = = and the equals method.
  3. Please explain what is final, finalize () and finally?
  4. What are graphical user interface widgets? What is its use?
  5. Can you describe Map and Hashmap?

  6. What is an abstract class? Does it contain static data?
  7. Is it possible to swap two variables without using the third variable?
  8. What is the difference between synchronized method and synchronized statement?
  9. What do you mean by preemptive scheduling?
  10. What is a runtime exception?
  11. What is an observer?
  12. What is an observable?
  13. How are observer and observable used in java programming?
  14. Which one of them are keywords in java programming - 'main', 'next', 'delete', 'exit'?
  15. Explain. What is the difference between exception and an error?
  16. What are the two ways of handling exceptions?
  17. Can you explain what GregorianCalender class means?
  18. How will you convert string to number in java?
  19. What will happen if private is declared as main method?
  20. What do you mean by Java Access Specifiers?
  21. Is it possible for an application having main method, have multiple classes?
  22. When is garbage collection used in java?
  23. What is finalization?
  24. What is the purpose of finalization?
  25. Explain the difference between non static and static inner class.
  26. Explain what are checked and unchecked exception.
  27. Name four different types of inner classes.
  28. What is the difference between Nested top-level class and Local Class?
  29. What is a wrapper class?
  30. Where do you need wrapper class? And, how do you use it?
  31. What is a package?
  32. What is a Java Virtual Machine? Where and how is it used?
  33. Can you explain in brief the Encapsulation Principle?
  34. What does time slicing mean?
  35. Phantom memory is a false memory. Explain.
  36. What does String Tokenizer mean?
  37. What is JDBC connection? What are the different steps involved in the JDBC connection?
  38. How do you define a variable?
  39. How can you serialize an object to a file?
  40. What are integer overflows and underflows?
  41. Can you explain what Native method is? For what purpose is it used?
  42. What are the eight primitive java types? Name them.
  43. Is object class extended by all the other classes? How?
  44. How would you explain object's lock?
  45. Is there a difference between an Abstract class and an Interface?
  46. What is multithreading?
  47. What is the main difference between arraylist and vector?
  48. What is a hashtable? Can you differentiate between a hashtable and a hashmap?
  49. What do you understand by pass by reference?
  50. Can you elaborate on Boolean & operator? What is it?
  51. What is a daemon thread? And, how is it created?

Contact Us : Privacy Policy