Object Oriented Programming Concept (OOP) in Java

[OOP Object Oriented Concepts in Java] In this chapter, we will learn the basics of Object Oriented Programming (OOP). Object-oriented programming includes many concepts such as inheritance, data binding, polymorphism, and so on.
Simula is considered as the first object-oriented programming language. It is a programming system where everything is represented as an object, and is known as the actual object-oriented language. However, the new Smalltalk is considered as the first real object-oriented programming language.

Object-oriented programming (OOP) 

     Object means an entity in the real world, such as tables, balls, cows, etc. Object-oriented programming is a method for designing a program by using classes and objects. statue. It simplifies the maintenance and development of software by providing several concepts:
  • Object: An entity that has state and behavior. For example, bicycles, tables, chairs, etc. It can be physical or logical.
  • Class: A set of objects. It is a logical entity.
  • Inheritance: When an object obtains attributes and behaviors of the parent object, it is inherited. This increases the reusability of the code. It is used to achieve polymorphism at runtime.
  • Polymorphism: When a task is executed in different ways, it is called polymorphism. For example, like drawing a rectangle or triangle, ... In Java, we use method overloading and method overriding for polymorphism. Another example: the cat calls meooo, the dog barked goooo.
  • Abstraction: It hides the internal details and display features. For example, with phone calls, we do not know what the internal processing is. In Java, they are using abstract and abstract interfaces for abstract purposes.
  • Enclosure: It binds code and data together into a single unit. For example, you may have known the capsule (or simply a packet of laundry detergent), different pills (detergent granules) are packaged.
A Java class is an example of closure. Java Bean is the real enclosing class, since all data members are private.

The advantages of (OOP ) object oriented programming in java when compared to procedural programming

      OOP makes it easier to design, develop, and maintain, while with procedural programming code management is quite difficult if the amount of code is increased. This increases the efficiency of the software development process.
     OOP provides Data Hiding while in the direction of the procedure a global data can be accessed from anywhere.
     OOP gives you the ability to simulate real-world events in a more efficient way. We can provide solutions to problems in the real world if we use object-oriented programming.

The difference between OOP and OBP (Object-base programming)

      Object-based programming has all the characteristics of OOP except inheritance. JavaScript and VBScript are examples of object-oriented programming languages.
To find out more about instance variables in java:

Comments