Since it's a static
method (class method), you can call it in two ways:
NameOfClass.printClass();
or
NameOfClass someInstance = new NameOfClass(...); // create instance
someInstance.printClass();
Why? Because class methods doesn't need an instance of the class to be called, so you can call it with only using the name of the class (first way). But Java also provides the feature to call the static
method using an instance of the class.