What are Access modifiers in java?
Access Modifiers are used to tell a variable, class, or method the scope to which it can be seen. It is often referred to as scope or the accessibility of a variable.
Private Scope
A private scope means that a certain item can only be accessed inside its own class. This is usually used with attributes that we don't want to be able to be changed or accessed from a function that is not within the specific class that it is from.
Public scope
Making a class, function, or attribute public in scope means that said object can be seen from within its own class, package, and throughout the computer. That means that certain data types that we want to be used by other files should be set to the public scope.