[Java] [Memo for myself] I tried to study object orientation lightly

1 minute read


This is my first year as a working adult who has just studied Java. I wrote an article like this to understand Java’s object orientation (laughs like a memo). We are looking for advice on Java.

What is object orientation?

Let’s get into the main subject. In the first place, I feel that object orientation is the first thing! ? (I did that too…)

Object-orientation seems to be one of the many ways of thinking about programming. It seems that the following three are achieved by object orientation.

  1. Program “Independence
  2. Program “Reusability
  3. Program “Extensibility

To achieve “independence”

There seems to be “encapsulation” as a way of thinking to realize “independence” by object orientation.

Encapsulation When I looked it up, it seems that the idea is to combine data (attributes) and methods (procedures) into one object and hide its contents… If I say it easily (I don’t know if it’s okay to say it, but laughter), I think it’s a way of thinking that the processing of the program cannot be seen from the outside.

To realize “reusability”

There seems to be “method” and “inheritance” as a way of realizing “reusability” by object-oriented.

Method A collection of a series of processing of the program. It is also said to be “procedure”.

Inheritance The idea of making variables and methods of one class available to another class…

To achieve “extendability”

There seems to be “abstraction” as a way of thinking that realizes “extendability” by object orientation.

Abstraction It seems that the common part of multiple classes is extracted and the others are ignored…