Public - It can be accessible across instances(objects). The value can be modified.
Private - It can be accessible across instance(objects) but the value cannot be modified.
These can be accessed by only methods.
Final - this keyword tells you that value can be assigned only once.
Static - This keyword let us know that this variable is a class level variable
and can be accessed even without an instance.
CONSTANT - If we cant to create any contansts you should be represent variable in
all UPPERCASE letters and words seperated by underscore.
Access level modifiers:
Top level - public or package-private
At member level - Public, private, protected,or package-private
Public - it is an access modifier which tell us when specified infront of class
or the member that it can be accessed anywhere meaning inside the class,
outside of the class(package), or inside of a subclass of another package, or anywhere in the world.
Private: it is an access modifier which when specified lets us know that the member
can be accessed with in the own class.
Protected- the member can be accessed with in its own class, with in the package
and subclass of another package.
package-private : if no modifier is specified then it is called package-private modifier
and can be accessed with in its own class, and in the package that class is present.
Constructor : is a method that will run when you instantiate class.Again instantiation happens
when you create the new instance of the class using new keyword.
A constructor is a great place to stick required information about initial set
up of the object.
Abstraction: is aprocess of hiding the unnecessary deatils/implementation details
from the consumers/customers and showing them what they need.
In other words,it tells us what the object does and hides how it does.
Overloading: Multiple methods with same name but different paramater list is called overloading.