Static Class Members
In Java you can create a field or method that does not belong to any object of a class. Such are known as static variables or static methods. Static Variable To declare a static variable, you put them in the class just like instance variables, but you put the keyword static in front. Static variables belong to…