Top 50+ OOPS Concepts Interview Questions and Answers - 2

Question: 6

What is the difference between an interface and abstract class?

In the interface all methods must be abstract; in the abstract class some methods can be concrete.

In the interface no accessibility modifiers are allowed, which is ok in abstract classes.

Question: 7

What is overloading?

Adding a new method with the same name in same/derived class but with different number/types of parameters. It implements Polymorphism.

Question: 8

What is abstraction?

Hiding the complexity. It is a process of defining communication interface for the functionality and hiding rest of the things.

Question: 9

What is overloading?

A process of creating different implementation of a method having a same name as base class, in a derived class. It implements Inheritance.

Question: 10

What does the keyword virtual mean in the method definition?

The method can be over-ridden.

Related Questions