What is object-oriented programming

Object-oriented programming (OOP) is a programming methodology based on representing a program as a collection of objects, each of which is an instance of a certain class, and the classes form a hierarchy of inheritance.

  • Object Oriented Programming uses objects rather than algorithms as the main logical building blocks;
  • every object is an instance of a certain class
  • classes form hierarchies.

A program is considered object-oriented only if all three of these requirements are met. In particular, programming that does not use inheritance is called programming using abstract data types, rather than object-oriented.

According to the OOP paradigm, a program consists of objects that exchange messages. Objects can have state, the only way to change the state of an object is to send it a message, in response to which the object can change its own state.


Comments

Popular posts from this blog

ArrayList and LinkedList in Java, memory usage and speed

volatile keyword in Java

What characters can a variable name consist of (a valid identifier) in Java