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
Artima Forums.
Message:
RE: Constructor
Posted by Kishori Sharan on November 25, 2000 at 2:41 PM
1 Q ) Ans. Constructor is not something which is created. When a class definition is loaded into memory then constructor definiction is also loaded because constructor code is a part of class definition. A class ia loaded when a) You call a static method of a class using class_name.method ( ) b) You create the first new object of that class. c) You may refer to a static member of the class using class name. But, constructor definition is used only when you create a new object of a class or its descendant. 2 Q.)what is the return of static method? Ans: What you choose to return!!!
Replies:
|