What are the OOPS concepts.

The following four are the important OOPS concepts.

Abstraction:

Abstraction is nothing but a exposing only important feature without inside functionality.

Encapsulation:

Encapsulation is a system utilized for concealing the properties and practices of an object . It keeps different objects from straightforwardly modifying or getting to the properties or strategies for the encapsulated object.

Inheritance:

Inheritance is one of the excellent assert of Object-Oriented Programming. It permits a class to utilize the methods and properties  for another class.

The determined class acquires the behavior of the base class. The determined class is likewise called subclass and the base class is otherwise called super-class.

The determined class can include its own particular extra factors and techniques. These extra factors and strategies separates the derived class from the base class.

And Inheritance is a run time system. A super-class can have any number of subclasses. In any case, a subclass can have just a single super class. This is on the grounds that Java does not bolster numerous legacy.


The superclass and subclass have "is-a" connection between them. The following is the syntax.

class classB extends Class A 
{  
   //methods and fields  
}  

Polymorphism:

Polymorphism in Java is an idea by which we can play out a solitary activity by various ways.
There are two sorts of polymorphism in Java as follows.


  1.  Compile time polymorphism
  2.  Runtime polymorphism 

By using two strategies we can perform polymorphism in Java there are over-loading and over-riding. On the off chance that you over-burden static technique in Java, it is the case of compile time polymorphism. 

No comments:

Post a Comment

What is Normalization?

Database normalization is a data design and organization process applied to data structures based on rules that help building relational dat...