Skip to main content

Posts

Showing posts with the label OOPS Interview Question

OOP Concept C# - Encapsulation Access modifiers - Interview Question / Answers

What is Encapsulation ?                Encapsulation is the process of hiding the data. It focus on implementation of an object.  Difference between abstraction and encapsulation ?               Abstraction allows making relevant information visible and encapsulation provides implementing desired level of abstraction.

OOP Concept C# - Abstract Class can not be instantiated - Interview Question / Answers

What is an Abstract Class ?                Abstract class in C# is a class that having the keyword as abstract and this class may have abstract methods. It is a mechanism to show only relevant data. Is Abstract class can be instantiated ?                No, Abstract class cannot be instantiated. Whether abstract class can be derived ?    Yes Abstract class be derived and all the abstract class should be defined in the derived class. Write the syntax for abstract class.       abstract class ClassName { // to do ; class definition } Can we do abstract method in an abstract class ?    Yes, We can add abstract method in the abstract class.