What are good interview questions for Java developers?

  1. What is the most important feature of Java ?
  2. What do you mean by platform independence ?
  3. What is a JVM ?
  4. Are JVM’s platform independent ?
  5. What is the difference between a JDK and a JVM ?
  6. What is a pointer and does Java support pointers ?
  7. What is the base class of all classes ?
  8. Does Java support multiple inheritance ?
  9. Is Java a pure object oriented language ?
  10. Are arrays primitive data types ?
  11. What is difference between Path and Classpath ?
  12. What are local variables ?
  13. What are instance variables ?
  14. How to define a constant variable in Java ?
  15. Should a main() method be compulsorily declared in all java classes ?
  16. What is the return type of the main() method ?
  17. Why is the main() method declared static ?
  18. What is the arguement of main() method ?
  19. Can a main() method be overloaded ?
  20. Can a main() method be declared final ?
  21. Does the order of public and static declaration matter in main() method ?
  22. Can a source file contain more than one class declaration ?
  23. What is a package ?
  24. Which package is imported by default ?
  25. Can a class declared as private be accessed outside it’s package ?
  26. Can a class be declared as protected ?
  27. What is the access scope of a protected method ?
  28. What is the purpose of declaring a variable as final ?
  29. What is the impact of declaring a method as final ?
  30. I don’t want my class to be inherited by any other class. What should i do ?
  31. Can you give few examples of final classes defined in Java API ?
  32. How is final different from finally and finalize() ?
  33. Can a class be declared as static ?
  34. When will you define a method as static ?
  35. What are the restriction imposed on a static method or a static block of code ?
  36. I want to print “Hello” even before main() is executed. How will you acheive that ?
  37. What is the importance of static variable ?
  38. Can we declare a static variable inside a method ?
  39. What is an Abstract Class and what is it’s purpose ?
  40. Can a abstract class be declared final ?
  41. What is use of a abstract variable ?
  42. Can you create an object of an abstract class ?
  43. Can a abstract class be defined without any abstract methods ?
  44. Class C implements Interface I containing method m1 and m2 declarations. Class C has provided implementation for method m2. Can i create an object of
  45. Can a method inside a Interface be declared as final ?
  46. Can an Interface implement another Interface ?
  47. Can an Interface extend another Interface ?
  48. Can a Class extend more than one Class ?
  49. Why is an Interface be able to extend more than one Interface but a Class can’t extend more than one Class ?
  50. Is sizeof a keyword ?

Comments