October 17, 2000

Object Class

Question: Every class in Java is supposed to extend the Object class by default. In case a user class extends some other class (e.g., if myclassextends yourclass), then is it

Constructors and Member Variables

Question: After I have already declared an object, how can I call its constructor again to re-initialize its member variables? Answer: You can’t do that. C++ guarantees that for each

Static Methods

Question: What is the purpose of static methods in Java? Answer: Static methods can be invoked without an instance of an object. They provide the ability to execute methods in