Final

Whenever we add 'final' in front of a variable, it means we can't change the variable under any circumstances. In this example we use an int variable number, but we…

Continue Reading Final

Static

We use the static keyword when we want all the objects to share a single variable. In this program we make 3 new objects that all share the static int…

Continue Reading Static

Public, private & this

Controlling different variables in different classes. In the below class, the declaration of; private int hour; private int minute; private int second; As private, only the methods within the cat.class…

Continue Reading Public, private & this