Ticker

6/recent/ticker-posts

BASIC CONCEPTS OOPS



1. Abstraction: The abstraction features is used to showing only essential details. 
For example we all know how to turn on the TV, but we don’t need to know how it works in order to enjoy its features. 
As in Java, abstraction means simple things like classes, objects, and variables represent more complex code and data and it help to avoid repeating the same task multiple times.

2. Encapsulation: As opposite of abstraction, the encapsulation is used to hide the unnecessary details and therefore it is a practice to keeping fields within a class private, then providing access to them via public methods. 
In other words it is a protective barrier that keeps the data and code safe within the class itself. This way, we can re-use objects like code components or variables without allowing open access to the data system-wide.

3. Inheritance: The inheritance is an important feature of object Oriented Programming languages because it is used to reuse the code. 
Actually it allow programmers to create new classes by use of already existing classes. 

Polymorphism: In simple words, polymorphism stands for "One thing with different forms" and this OOP feature allow the programmers to use the same word with different meaning to one things in different contexts. 
Overloading is one of the popular form of pylymorphism in Java is met. That’s when different meanings are implied by the code itself. The other form is method overriding. That’s when the different meanings are implied by the values of the supplied variables. See more on this below.



Post a Comment

0 Comments