This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Posted by cannyq on September 27, 2000 at 1:52 PM
> It is generally said that one has to create a reference of the
> base class in order to refer to its objects. Like in case of
> RunTime polymorphism in order to execute the method of the base
> class one has to create the reference of the base class. Why is
> it so ??
You only need to create an instance of the object (with the "new" operator) if you want to access its instance methods. But if you want to call the class' static methods, you don't have to create an instance. For example, YourClass.yourFunction(). Hope this helps.