You must construct at least one instance of a class to use the class's static methods.
True or False? I can't seem to come up with an answer. I don't know the first thing to do to tackle this question.
You must construct at least one instance of a class to use the class's static methods.
True or False? I can't seem to come up with an answer. I don't know the first thing to do to tackle this question.
You must construct at least one instance of a class to use the class's static methods.
False. static methods (aka class methods) are at the class level, not the instance level. The JLS link says (in part) A class method is always invoked without reference to a particular object.