Java Interview Questions
Java Interview Questions
38. What is meant by a super class and how can you call a super class ?
39. What is anonymous class ?
40. Name interfaces without a method ?
41. What is the use of an interface ?
42. What is a serializable interface ?
43. How to prevent field from serialization ?
44. What is meant by exception ?
45. How can you avoid the runtime exception ?
46. What is the difference between throw and throws ?
47. What is the use of finally ?
48. Can multiple catch statements be used in exceptions ?
49. Is it possible to write a try within a try statement ?
50. What is the method to find if the object exited or not ?
51. What is meant by a Thread ?
52. What is meant by multi-threading ?
53. What is the 2 way of creating a thread ? Which is the best way and why
?
54. What is the method to find if a thread is active or not ?
55. What are the thread-to-thread communcation ?
56. What is the difference between sleep and suspend ?
57. Can thread become a member of another thread ?
58. What is meant by deadlock ?
59. How can you avoid a deadlock ?
60. What are the three typs of priority ?
61. What is the use of synchronizations ?
62. Garbage collector thread belongs to which priority ?
63. What is meant by time-slicing ?
64. What is the use of this ?
65. How can you find the length and capacity of a string buffer ?
66. How to compare two strings ?
67. What are the interfaces defined by Java.lang ?
68. What is the purpose of run-time class and system class
69. What is meant by Stream and Types ?
70. What is the method used to clear the buffer ?
71. What is meant by Stream Tokenizer ?
72. What is serialization and de-serialisation ?
73. What is meant by Applet ?
74. How to find the host from which the Applet has originated ?
75. What is the life cycle of an Applet ?
76. How do you load an HTML page from an Applet ?
77. What is meant by Applet Stub Interface ?
117.
How do you connect to the database ? What are the steps ?
118.
What are the drivers available in JDBC ? Explain
119.
How can you load the driver ?
120.
What are the different types of statement s ?
121.
How can you created JDBC statements ?
122.
How will you perform transactions using JDBC ?
123.
What are the two drivers for web apllication?
124.
What are the different types of 2 tier and 3 tier architecture ?
125.
How can you retrieve warning in JDBC ?
126.
What is the exception thrown by JDBC ?
127.
What is meants by PreparedStatement ?
128.
What is difference between PreparedStatement and Statement ?
129.
How can you call the stored procedures ?
130.
What is meant by a ResultSet ?
131.
What is the difference between ExecuteUpdate and ExecuteQuery
?
132.
How do you know which driver is connected to a database ?
133.
What is DSN and System DSN and differentiate these two ?
134.
What is meant by TCP, IP, UDP ?
135.
What is the difference between TCP and UDP ?
136.
What is a proxy server ?
137.
What is meant by URL
138.
What is a socket and server sockets ?
139.
When MalformedURLException and UnknownHost Exception
throws ?
140.
What is InetAddress ?
141.
What is datagram and datagram packets and datagram sockets ?
142.
Write the range of multicast socket IP address ?
143.
What is meant by a servlet ?
144.
What are the types of servlets ? Explain
145.
What is the different between a Servlet and a CGI.
146.
What is the difference between 2 types of Servlets ?
147.
What is the type of method for sending request from HTTP server
?
148.
What are the exceptions thrown by Servlets ? Why ?
149.
What is the life cycle of a servlet ?
150.
What is meant by cookies ?
151.
What is HTTP Session ?
152.
What is the difference between GET and POST methods ?
153.
How can you run a Servlet Program ?
154.
How to commuincate between an applet and a servlet ?
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
3.
4.
5.
6.
7.
8.
9.
37. Suppose server object is not loaded into the memory, and the client
request for it , what will happen?
38. What is serialization ?
39. Can you load the server object dynamically? If so, what are the major 3
steps involved in it ?
40. What is difference RMI registry and OSAgent ?
41. To a server method, the client wants to send a value 20, with this value
exceeds to 20,. a message should be sent to the client ? What will you do
for achieving for this ?
42. What are the benefits of Swing over AWT ?
43. Where the CardLayout is used ?
44. What is the Layout for ToolBar ?
45. What is the difference between Grid and GridbagLayout ?
46. How will you add panel to a Frame ?
47. What is the corresponding Layout for Card in Swing ?
48. What is light weight component ?
49. Can you run the product development on all operating systems ?
50. What is the webserver used for running the Servlets ?
51. What is Servlet API used for conneting database ?
52. What is bean ? Where it can be used ?
53. What is difference in between Java Class and Bean ?
54. Can we send object using Sockets ?
55. What is the RMI and Socket ?
56. How to communicate 2 threads each other ?
57. What are the files generated after using IDL to Java Compilet ?
58. What is the protocol used by server and client ?
59. Can I modify an object in CORBA ?
60. What is the functionality stubs and skeletons ?
61. What is the mapping mechanism used by Java to identify IDL language ?
62. Diff between Application and Applet ?
63. What is serializable Interface ?
64. What is the difference between CGI and Servlet ?
65. What is the use of Interface ?
66. Why Java is not fully objective oriented ?
67. Why does not support multiple Inheritance ?
68. What it the root class for all Java classes ?
69. What is polymorphism ?
70. Suppose If we have variable ' I ' in run method, If I can create one or
more thread each thread will occupy a separate copy or same variable
will be shared ?
71. In servlets, we are having a web page that is invoking servlets username
and password ? which is cheks in the database ? Suppose the second
page also If we want to verify the same information whethe it will
connect to the database or it will be used previous information?
72. What are virtual functions ?
73. Write down how will you create a binary Tree ?
74. What are the traverses in Binary Tree ?
75. Write a program for recursive Traverse ?
76. What are session variable in Servlets ?
77. What is client server computing ?
78. What is Constructor and Virtual function? Can we call Virtual funciton
in a constructor ?
79. Why we use OOPS concepts? What is its advantage ?
80. What is the middleware ? What is the functionality of Webserver ?
81. Why Java is not 100 % pure OOPS ? ( EcomServer )
82. When we will use an Interface and Abstract class ?
83. What is an RMI?
84. How will you pass parameters in RMI ? Why u serialize?
85. What is the exact difference in between Unicast and Multicast object ?
Where we will use ?
86. What is the main functionality of the Remote Reference Layer ?
87. How do you download stubs from a Remote place ?
88. What is the difference in between C++ and Java ? can u explain in detail
?
89. I want to store more than 10 objects in a remote server ? Which
methodology will follow ?
90. What is the main functionality of the Prepared Statement ?
91. What is meant by static query and dynamic query ?
92. What are the Normalization Rules ? Define the Normalization ?
93. What is meant by Servelet? What are the parameters of the service
method ?
94. What is meant by Session ? Tell me something about HTTPSession
Class ?
95. How do you invoke a Servelt? What is the difference in between doPost
and doGet methods ?
96. What is the difference in between the HTTPServlet and Generic Servlet
? Expalin their methods ? Tell me their parameter names also ?
97. Have you used threads in Servelet ?
98. Write a program on RMI and JDBC using StoredProcedure ?
99. How do you sing an Applet ?
100.
In a Container there are 5 components. I want to display the all the
components names, how will you do that one ?
101.
Why there are some null interface in java ? What does it mean ?
Give me some null interfaces in JAVA ?
102.
Tell me the latest versions in JAVA related areas ?
103.
What is meant by class loader ? How many types are there? When
will we use them ?
104.
How do you load an Image in a Servlet ?
105.
What is meant by flickering ?
106.
What is meant by distributed Application ? Why we are using that
in our applications ?
107.
What is the functionality of the stub ?
108.
Have you used any version control ?
109.
What is the latest version of JDBC ? What are the new features
are added in that ?
110.
Explain 2 tier and 3 -tier Architecture ?
111.
What is the role of the webserver ?
112.
How have you done validation of the fileds in your project ?
113.
What is the main difficulties that you are faced in your project ?
114.
What is meant by cookies ? Explain ?
115.
Problem faced in your earlier project
116.
How OOPS concept is achieved in Java
117.
Features for using Java
118.
How does Java 2.0 differ from Java 1.0
119.
Public static void main Explain
120.
What are command line arguments
121.
Explain about the three-tier model
122.
Difference between String & StringBuffer
123.
Wrapper class. Is String a Wrapper Class
124.
What are the restriction for static method
125.
Purpose of the file class
126.
Default modifier in Interface
127.
Difference between Interface & Abstract class
128.
Can abstract be declared as Final
129.
Can we declare variables inside a method as Final Variables
130.
What is the package concept and use of package
131.
How can a dead thread be started
132.
Difference between Applet & Application
133.
Life cycle of the Applet
134.
Can Applet have constructors
135.
Differeence between canvas class & graphics class
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.