posted 21 years ago
John,
Welcome to the JavaRanch!
Static methods can be invoked directly on the class: there is no need for an instance of the class. Please note the statement
B.m1("main");
does not make use of a reference to an instance of the class B. Instead, the method is invoke on the class--not on an instance of the class.
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>