Posted by
Zhullyblog
on
- Get link
- X
- Other Apps
Java Object Oriented Programming
OOP means Object Oriented Programming. This is a concept that basically deals with the use of object in programming. Unlike procedural programming that deals with the use of procedure and steps to execute a program, OOP makes use of Object in programming.
The concept of Java Object Oriented Programming entails the following:
• Polymorphism
• Inheritance
• Encapsulation
• Abstraction
• Class
• Method
• Object
Now, let's go into details.
POLYMORPHISM
Polymorphism is a Java Object Oriented Programming feature that allows objects to take many forms. This feature allows differentiation of entities with the same name. Click here to go into details.
INHERITANCE
Generally, inheritance means taking over or inherting the properties if parents. So relating this to Java OOP, Inheritance in Java results when an object inherits the features and property of it parents class. All the property, features , behavior, identify of the parent class can be reused efficiently by the child object.
ENCAPSULATION
Generally, when we talk of encapsulation, we mean hide something. So in programming, encapsulation is simply a way of hiding the details of data to prevent access from other class.
This feature simple hides the details of a class thus declaring the variable as private so that it details would not be access by other classes.
ABSTRACTION
Abstraction is simply a mechanism of displaying the exterior or essential feature to the user and technically hiding the complete details. This is just like showing the user the frontend to the user and hiding the backend from the user.
A good example is a computer. Normally, when you give command to the computer, you get result but you don't know how the answers come to being. You only get result but you don't know the hidden process that gives the results.
This process is simply called Abstraction.
CLASS
A class is a blueprint for an object. A class contains the details of an object. There are 3 important things to know in class. They are :
• A class can be public or private
• A class should have a name with the initial letter in uppercase
• A class body starts with an open braces "{ " and ends with a close barces "}"
OBJECT
An object is a well defined collection of a data. An object has 3 character which are
• State
• Behaviour
• Identify
Introduction to Java programming
How to declare a variable in Java
If, if..else statement in Java
Constructors in Java programming
Please share
Comments
Post a Comment