|
|
Java Interview Questions
CORE JAVA
1.Can a main() method of class be invoked in another class?
2. What is the difference between == & .equals
3. What is the difference between abstract class &
Interface.
4. What is singleton class & it's implementation.
5. Use of static,final variable
6. Examples of final class
7. Difference between Event propagation & Event
delegation
8. Difference between Unicast & Multicast model
9. What is a java bean
10. What is synchronized keyword used for.
12. What are the restrictions of an applet & how to
make the applet access the local
machines resources.
14. What is reflect package used for & the methods of
it.
16. What is serialization used for
1.Can methods be overloaded based on the return types ?
2.Why do we need a finalze() method when Garbage Collection
is there ?
52. Difference between AWT and Swing compenents ?
53. Is there any heavy weight component in Swings ?
54. Can the Swing application if you upload in net, be
compatible with your browser?
55. What should you do get your browser compatible with
swing components?
57. What are the methods in Applet ?
58. When is init(),start() called ?
59. When you navigate from one applet to another what are
the methods called?
60. What is the difference between Trusted and Untrusted
Applet ?
61. What is Exception ?
62. What are the ways you can handle exception ?
63. When is try,catch block used ?
64. What is finally method in Exceptions ?
65. What are the types of access modifiers ?
66. What is protected and friendly ?
67. What are the other modifiers ?
68. Is synchronised modifier ?
69. What is meant by polymorphism ?
70. What is inheritance ?
71. What is method Overloading ? What is this in OOPS ?
72. What is method Overriding ? What is it in OOPS ?
73. Does java support multi dimensional arrays ?
74. Is multiple inheritance used in Java ?
75. How do you send a message to the browser in JavaScript
?
Java Interview Questions
2
76. Does javascript support multidimensional arrays ?
80. Is there any tool in java that can create reports ?
81. What is meant by Java ?
82. What is meant by a class ?
83. What is meant by a method ?
84. What are the OOPS concepts in Java ?
85. What is meant by encapsulation ? Explain with an
example
86. What is meant by inheritance ? Explain with an example
87. What is meant by polymorphism ? Explain with an example
88. Is multiple inheritance allowed in Java ? Why ?
89. What is meant by Java interpreter ?
90. What is meant by JVM ?
91. What is a compilation unit ?
92. What is meant by identifiers ?
93. What are the different types of modifiers ?
94. What are the access modifiers in Java ?
95. What are the primitive data types in Java ?
96. What is meant by a wrapper class ?
97. What is meant by static variable and static method ?
98. What is meant by Garbage collection ?
99. What is meant by abstract class
100. What is meant by final class, methods and variables ?
101. What is meant by interface ?
102. What is meant by a resource leak ?
103. What is the difference between interface and abstract
class ?
104. What is the difference between public private,
protected and static
106. What is meant by method overloading ?
107. What is meant by method overriding ?
108. What is singleton class ?
109. What is the difference between an array and a vector ?
110. What is meant by constructor ?
111. What is meant by casting ?
112. What is the difference between final, finally and
finalize ?
113. What is meant by packages ?
114. What are all the packages ?
115. Name 2 calsses you have used ?
116. Name 2 classes that can store arbitrary number of
objects ?
117. What is the difference between java.applet.* and java.applet.Applet ?
118. What is a default package ?
119. What is meant by a super class and how can you call a
super class ?
Java Interview Questions
3
120. What is anonymous class ?
121. Name interfaces without a method ?
122. What is the use of an interface ?
123. What is a serializable interface ?
124. How to prevent field from serialization ?
125. What is meant by exception ?
126. How can you avoid the runtime exception ?
127. What is the difference between throw and throws ?
128. What is the use of finally ?
129. Can multiple catch statements be used in exceptions ?
130. Is it possible to write a try within a try statement ?
131. What is the method to find if the object exited or not
?
132. What is meant by a Thread ?
133. What is meant by multi-threading ?
134. What is the 2 way of creating a thread ? Which is the
best way and why?
135. What is the method to find if a thread is active or
not ?
136. What are the thread-to-thread communcation ?
137. What is the difference between sleep and suspend ?
138. Can thread become a member of another thread ?
139. What is meant by deadlock ?
140. How can you avoid a deadlock ?
141. What are the three typs of priority ?
142. What is the use of synchronizations ?
143. Garbage collector thread belongs to which priority ?
144. What is meant by time-slicing ?
145. What is the use of 'this' ?
146. How can you find the length and capacity of a string
buffer ?
147. How to compare two strings ?
148. What are the interfaces defined by Java.lang ?
149. What is the purpose of run-time class and system class
150. What is meant by Stream and Types ?
151. What is the method used to clear the buffer ?
152. What is meant by Stream Tokenizer ?
153. What is serialization and de-serialisation ?
154. What is meant by Applet ?
155. How to find the host from which the Applet has
originated ?
156. What is the life cycle of an Applet ?
157. How do you load an HTML page from an Applet ?
158. What is meant by Applet Stub Interface ?
159. What is meant by getCodeBase and getDocumentBase
method ?
160. How can you call an applet from a HTML file
161. What is meant by Applet Flickering ?
162. What is the use of parameter tag ?
163. What is audio clip Interface and what are all the
methods in it
Java Interview Questions
4
164. What is the difference between getAppletInfo and getParameterInfo ?
165. How to communicate between applet and an applet ?
166. What is meant by event handling ?