"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.

undefined
10
Task
Java Core, level 8, lesson 3
Locked
Maximum byte
Enter a file name from the console. Find the maximum byte in the file. Display it on the screen. Close the IO stream.
undefined
5
Task
Java Core, level 8, lesson 3
Locked
Minimum byte
Enter a file name from the console. Find the minimum byte in the file. Display it on the screen. Close the IO stream.
undefined
20
Task
Java Core, level 8, lesson 3
Locked
Most frequent bytes
Enter a file name from the console. Find the byte or bytes with the maximum number of repetitions. Display them on the screen, separated by spaces. Close the IO stream.
undefined
10
Task
Java Core, level 8, lesson 3
Locked
Rarest bytes
Enter a file name from the console. Find the byte or bytes with the minimum number of repetitions. Display them on the screen, separated by spaces. Close the IO stream.
undefined
10
Task
Java Core, level 8, lesson 3
Locked
Sorting bytes
Enter a file name from the console. Read all the bytes from the file. Ignoring repetitions, sort them by byte-code in ascending order. Display the result on the screen. Close the IO stream. Example of bytes in the input file: 44 83 44 Example output: 44 83