Java OOPs

What are the principle concepts of OOPS? There are four principle concepts upon which object oriented design and programming rest. They are: Abstraction Polymorphism Inheritance Encapsulation (i.e. easily remembered as A-PIE). What is Abstraction? Abstraction refers to the act of representing essential features without including the background details or explanations. What is Encapsulation? Encapsulation is a technique used for hiding the properties and behaviors of an object and allowing outside access only as appropriate. It prevents other objects from directly altering or accessing the properties or methods of the encapsulated object. What is the difference between abstraction and encapsulation? Abstraction focuses on the outside view of an object (i.e. the interface) Encapsulation (information hiding) prevents clients from seeing it’s inside view, where the behavior of the abstraction is implemented. Abstraction solves the problem in the design side while Encapsulation is the Implementation. Encapsulation is the deliverables of Abstraction. Encapsulation barely… Read more“Java OOPs”

Object oriented concepts used in Java

Java is an Object-Oriented Language hence before learning java let us understand the object oriented Concepts first. Object An object in the software world means a bundle of related variables and functions known as methods variables and functions known as methods. Software objects are often used to model real-world objects you find in everyday life. The real world objects and software objects share two characteristics : 1. State : condition of an item. 2. Behaviour : Observable effects of an operation or event including its results. State can be of two types : Active state which reflects the behaviour and Passive State refers to state which does not change which does not change. The behaviour of an object forms the interface to the external world. Class A class is a blueprint or prototype that defines the variables and the methods (or funtions) common to all objects of a certain kind. Constituents… Read more“Object oriented concepts used in Java”