Java Questions PDF
Java Questions PDF
Exceptions
60. Super most class in Exception Hierarchy and what is error and
what is an exception?
61. Types of exceptions and Example for Checked and Unchecked
62. Difference between throw and throws
63. How to handle an exception and can we have try and catch block
inside finally block?
64. How do create Custom Exception and how to make Checked or
Unchecked Custom Exception
65. Can we write only try block without catch and finally blocks?
66. Can we have try without a catch block? If yes, how?
67. Can we have executable lines of code between try and catch blocks
68. Can we have nested try and catch blocks
69. Can exceptions occur at compile time
70. Difference between error and exception
71. Can we handle multiple exceptions in single catch blocks
72. With throws can we use multiple exceptions
73. Explain finally block
LIBRARIES AND COLLECTIONS
74. Supermost class in java
75. Few predefined libraries and what is java.lang package?s
76. Explain String and mutable version of String
77. Difference between StringBuffer and StringBuilder
78. Explain toString, hashcode and equals()
79. Explain SOP
80. Explain Specialization and Generalization
81. What is a framework?
82. What is collection and explain collection hierarchy
83. Diff between collection and collections
84. Explain java equality contract
85. Diff between ArrayList and LinkedList
86. Diff between ArrayList and Vector
87. Diff between List and Set
88. Initial capacity of Arraylist and HashSet
89. Explain autoboxing and unboxing
90. Explain wrapper classes
91. Explain Generics
92. Constructors in ArrayList, LinkedList, Vector, and HashSet
93. Diff between Iterator and ListIterator
94. Diff between HashSet and LinkedHashSet
95. Diff between Comparable and Comparator
96. Diff between TreeSet and HashSet
97. When to use Arraylist and when LinkedList?
98. Explain maps and Difference between HashMap, LinkedHashMap
and TreeMap
Any doubts or queries wrt any of the above questions drop a mail to the
below mail id : [email protected]