Java Interview Questions



  1. What makes Java Platform Independent?
  2. What is the difference between import and import static?
  3. What is mean by in, out and err?
  4. What is the difference among final, finally and finalizer?
  5. What is mean by final variable, final field, final method and final class/
  6. What is the difference between final value and constant value?
  7. What is the difference between abstract class and interface?
  8. What is Singleton object?
  9. What is the use of private constructor?
  10. What are factory methods?
  11. Can we forcibly call the Garbage Collector?
  12. What are static blocks?
  13. What are wrapper classes?
  14. What is the difference between PATH and CLASSPATH?
  15. How to check current version of JDK in your machine?
  16. Can we run some Java class without main()?
  17. What is mean by List, Set and Map?
  18. What is mean by try-with-resource?
  19. What is diamond operator?
  20. What is mean by auto boxing and auto unboxing?
  21. What is mean by compile time polymorphic?
  22. What is meany by run time polymorphic or dynamic method dispatch?
  23. What is the difference between method overloading and method overriding?
  24. What is the difference between equals() and ==?
  25. What is the difference among association, aggregation and composition?
  26. What is meta data? How to get meta information from a ResultSet?
  27. What is top level class in Java hierarchy?
  28. What is the difference between Error and Exception?
  29. What is mean by checked and unchecked exceptions?
  30. What is the difference between throw and throws?
  31. What is the difference between thread and process?
  32. How to start a process in Java?
  33. What is mean by mutable and immutable?
  34. What is mean by serialization?
  35. What is mean by synchronization?
  36. What is daemon thread?
  37. What is the difference between yield() and sleep() methods?
  38. What is mean by array of array or Jagged Array?
  39. What is mean by triple dot(...) in Java?
  40. How create methods which can take variable number of arguments?
  41. What is mean by non-interactive input?
  42. What is mean by command line arguments?
  43. What is mean by REPL in Java 9 and 10?
  44. What is mean by constructor chaining?
  45. What is mean by JAR file? How to create and use JAR files?
  46. What is mean by NullPointerException?
  47. What the difference between AWT and Swing?
  48. What is mean by Pluggable look and feel?
  49. What is the difference between paint and repaint()?
  50. What is a transient variable?
  51. What will happen if static modifier is removed from the main()?
  52. What is the default value of an object reference declared as an instance variable?
  53. What is the difference between >> and >>> ?
  54. If some array contains various types of data how we can extract specific type of data?
  55. What is the difference between inner class and nested class?
  56. Given the given code, print the output as Dear Rohit, Welcome to India without changing anything inside main()
import static java.lang.System.out;
public class Sample 
{
    public static void main(String[] args) 
    {
        out.print("Welcome");
    }
}



Comments