"Hello, Professor!"

"Well, hello, Amigo! It seems you've grown a little since our last meeting…"

"Professor, I saw you yesterday :) I've come to you for new lessons."

"What would you like to know, Amigo?"

"It seems I didn't fully understand access modifiers and how they're used."

"So that's it! Let me think... Right! I have what you need. And, I think, there's something else that will help you best understand the topic taught on this level.

Access modifiers. Private, protected, default, public

In this lesson, we'll get acquainted with the concept of access modifiers and consider examples of how to work with them. You already know that there are four modifiers that control access to different parts of your code. This time we will analyze in detail the circumstances in which they may come in handy.

Sequence of actions during object creation

Today your awareness of Java will now allow us to talk in more detail about creating objects. In an article, we'll consider this process in full: how constructors are called, how and in what order fields (including static fields) are initialized, and so on.