Core Java Interview questions


Total available count: 646
Subject - Java Technologies
Subsubject - Core Java

What do you know about covariant return type in java?

 Parent instances(objects) can be replaced by instances(objects) of subclass.It is known as covariant.This principle was introduced by  eminent Barbara Liskov and Jeannette Wing. It is also called as Liskov substitution principle.Covariant return, means that when one overrides a method, the return type of the overriding method is allowed  to be a subtype of the overridden method's return type.

 




Next 5 interview question(s)

1

Can we override final method in java?

2

Differentiate overloading and overriding in java?

3

Define Run time polymorphism and give an example in java?

4

Define Compile time polymorphism and give an example in java?

5

How many types of polymorphism available in java?