All program code is contained within the methods of some class.
If a method is declared with the keyword static , then it acts just like the functions, subroutines, or procedures of other languages. A method that is not declared static can only be used if it is associated by the caller with an object that is an instance of its class. Not surprising, this is called an instance method . Presumably, this method checks the values of the instance variables month, day, and year to verify that they represent a proper date. A static method can use any static field variables in the class, but it cannot use instance variable names because a static method has no associated object to provide the instance variables.