Top 500+ Advanced Java Interview Questions 2020-2021 - 2

Question: 6

What is Dynamic Method Dispatch?

Dynamic method dispatch is the mechanism by which a call to an overridden function is resolved at run time, rather than at compile time.

Question: 7

What is early binding?

The assignment of types to variables and expression at compilation time is known as Early Binding, it is also called static binding and static typing.

Question: 8

Can you make an instance of an abstract class?

No. You cannot make an instance of an abstract class.

An abstract class has to be sub classed.

If you have an abstract class and you want to use a method which has been implemented, you may need to subclass that abstract class, instantiate your subclass and then call that method.

Question: 9

Objects are passed by value or reference?

Java only supports pass by value.

With Objects, the object reference itself is passed by values and so both the original reference and parameter copy both refer to the same object.

Question: 10

Where and how can you use a primitive constructor?

Private constructor is used if you do not want other classes to instantiate the object and to prevent sub classing.

Related Questions