Describe the various concepts related to object oriented programming (OOP).

Sharad Jaiswal
Sharad Jaiswal

Posted On: Feb 22, 2018

 

The three main concepts related to object-oriented programming include the following:

  • Encapsulation: Encapsulation is an instrument by which an engineer could shroud execution behind an interface. Encapsulation code has two highlights: Instance factors are kept ensured (for the most part with the private modifier). Getter and setter techniques give access to occasion factors.
  • Inheritance: Inheritance enables a class to be a subclass of a superclass and along these lines acquire open and secured factors and techniques for the superclass. It is a key idea that underlies polymorphism, superseding, over-burdening and throwing.
  • Polymorphism: Polymorphism signifies "numerous structures." A reference variable is dependable of a solitary, unchangeable sort, yet it can allude to a subtype object. A solitary item can be alluded to by reference factors of a wide range of sorts — as long as they are a similar kind of a super type of the article. Polymorphic strategy summons applies just to superseded example strategies.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Java 10 Interview Questions

    What is the technique adopted to create an immutable class?

    In order to create an immutable class, follow the below steps:..

    Java 10 Interview Questions

    What methodology can be utilized to link to a database?

    The following steps can be utilized to link to a database:..

    Java 10 Interview Questions

    Enlist some features of JDK.

    It represents a Java Development Kit...