Exams Attended

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Core Java Interview Questions and Answers

  Difficulty Level: AllBeginnerIntermediateExperienced/Expert

Ques 1. What is Cloneable Interface in Core Java?

Ques 2. What is abstraction?

Ques 3. String vs StringBuffer vs StringBuilder in Java

Ques 4. What is the difference amongst JVM Spec, JVM Implementation, JVM Runtime ?

Ques 5. What is JIT and its use?

Ques 6. How will you get the platform dependent values like line separator, path separator, etc., ?

Ques 7. What comes to mind when someone mentions a shallow copy and deep copy in Java?

Ques 8. Why are there no global variables in Java?

Ques 9. Which Java operator is right associative?

Ques 10. Describe what happens when an object is created in Java?

Ques 11. How are commas used in the intialization and iteration parts of a for statement?

Ques 12. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?

Ques 13. How many methods in the Serializable interface?

Ques 14. How many methods in the Externalizable interface?

Ques 15. What is the difference between Serializalble and Externalizable interface?

Ques 16. What is the difference between a static and a non-static inner class?

Ques 17. What is reflection?

Ques 18. Can an anonymous class be declared as implementing an interface and extending a class?

Ques 19. Why isn't there operator overloading?

Ques 20. What does the keyword "synchronize" mean in java. When do you use it? What are the disadvantages of synchronization?

Ques 21. What synchronization constructs does Java provide? How do they work?

Ques 22. Do I need to use synchronized on setValue(int)?

Ques 23. Which class is the wait() method defined in? I get incompatible return type for my thread getState( ) method!

Ques 24. What is a working thread?

Ques 25. What is a green thread?

Ques 26. What are the different level lockings using the synchronization keyword?

Ques 27. What is synchronization and why is it important?

Ques 28. Can a lock be acquired on a class?

Ques 29. What is a task's priority and how is it used in scheduling?

Ques 30. What is a daemon thread?

Ques 31. If an object is garbage collected, can it become reachable again?

Ques 32. What is garbage collection? What is the process that is responsible for doing that in java?

Ques 33. What is the finalize method do?

Ques 34. What is the implementation of destroy method in java.. is it native or java code?

Ques 35. How many times may an object's finalize() method be invoked by the garbage collector?

Ques 36. How can you minimize the need of garbage collection and make the memory use more effective?

Ques 37. Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?

Ques 38. If a class is located in a package, what do you need to change in the OS environment to be able to use it?

Ques 39. What interface do you implement to do the sorting?

Ques 40. What is the significance of ListIterator?

Ques 41. What are order of precedence and associativity, and how are they used?

Ques 42. What is nested class?

Ques 43. Why do threads block on I/O?

Ques 44. What an I/O filter?

Ques 45. What value does read() return when it has reached the end of a file?

Ques 46. What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

Ques 47. How will you invoke any external process in Java?

Ques 48. What is skeleton and stub? what is the purpose of those?

Ques 49. Can you write a Java class that could be used both as an applet as well as an application?

Ques 50. What is a DatabaseMetaData?

Ques 51. In a statement, I am executing a batch. What is the result of the execution?

Ques 52. In which case, do we need abstract classes with no abstract methods?

Ques 53. What's the use of concrete methods in abstract classes?

Ques 54. Can a method be static and synchronized?

Ques 55. What is Encapsulation in Java and OOPS with Example?

Ques 56. Difference between Thread and Runnable interface in Java?

Ques 57. Difference between Wait and Sleep , Yield in Java

Ques 58. Difference between Vector and ArrayList in Java

Ques 59. Difference between wait, notify and notifyAll in Core Java.

Ques 60. What is Checked Exception and its use in java?

Ques 61. What is Unchecked Exception in java?

Ques 62. What is Anonymous (inner) Class in java?

©2023 WithoutBook