Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

151.

What is dynamic method dispatch?

Answer»
152.

What is the similarity between Dynamic Binding and linking?

Answer»
153.

State the difference between creating String as new () and literal.

Answer»
154.

What are some alternatives to inheritance?

Answer»
155.

What are the steps in the JDBC connection?

Answer»
156.

Mention the default values of all the elements of an array defined as an instance variable.

Answer»
157.

How applets communicate with each other?

Answer»
158.

Is there any difference between synchronized methods and synchronized statements?

Answer»
159.

What is the difference between preemptive scheduling and time slicing?

Answer»
160.

How are Observer and Observable used?

Answer»
161.

Can a top level class be private or protected?

Answer»
162.

What is the common usage of serialization? What exceptions occur during serialization?

Answer»
163.

Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.ABCD compile?

Answer»
164.

What do you understand by weak reference?

Answer»
165.

What do you understand by Soft reference?

Answer»
166.

Write a code to show a static variable

Answer»
167.

What is the difference between a constructor and a method?

Answer»
168.

Tell us something about set interface.

Answer»
169.

What are the different collection views provided by Maps?

Answer»
170.

When should you use ArrayList and when should you use LinkedList?

Answer»
171.

What are the restrictions imposed on method overriding?

Answer»
172.

What is final modifier?

Answer»
173.

Explain numeric promotion?

Answer»
174.

How do constructors use this() and super()?

Answer»
175.

Tell us something about an Iterator.

Answer»
176.

If a class is declared without any access modifiers, where can the class be accessed?

Answer»
177.

What do you mean by order of precedence and associativity?

Answer»
178.

What is Downcasting?

Answer»
179.

Tell us something about different types of casting?

Answer»
180.

Can we declare a static variable inside a method?

Answer»
181.

What is the difference between final, finally and finalize()?

Answer»
182.

If you do not want your class to be inherited by any other class. What would you do?

Answer»
183.

Which package is imported by default?

Answer»
184.

When is finally block NOT called?

Answer»
185.

What is Covariant Return Type?

Answer»
186.

Why Singleton pattern is better than creating Singleton class with static instance?

Answer»
187.

How can you make sure that your singleton class will always return single instance in multi-threaded environment?

Answer»
188.

What is Singleton Pattern?

Answer»
189.

What is Re-factoring in Software?

Answer»
190.

What is Hash Code collision?

Answer»
191.

What is Contract between hashcode and equal method?

Answer»
192.

How static variable work in java?

Answer»
193.

What is the use of volatile in Java?

Answer»
194.

What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?

Answer»
195.

Static Synchronization vs. Instance Synchronization?

Answer»
196.

What is the Difference between synchronized and synchronized block?

Answer»
197.

What is the use of Join method?

Answer»
198.

Which way a developer should use for creating thread, i.e. Sub classing Thread or implementing Runnable.

Answer»
199.

What are the different ways of creating thread?

Answer»
200.

Explain Java Thread Life cycle.

Answer»