May 2019
Intermediate to advanced
546 pages
12h 41m
English
As the name suggests, access modifiers help to restrict the scope of a class, constructor, variable, or method. Let's take a look at the different access modifiers and see how to impact our logic.
Let's go back to our class and analyze the code a little bit more in depth. The first line in our code is the definition of our class:
public class MovieSelector {}
In this line of code, you have three parts:
The first part is the most important in this chapter.
The access modifier allows you to define the visibility of your classes, variables, or methods. I will give you an overview of the different access modifiers and what they ...
Read now
Unlock full access