|
Could you activate the speak() method without creating an object? A good answer might be:No. |
Picture of the Program
The speak() method is part of an object. It only exists when there is an object for it to be part of (unlike a static method that does not need an object.) Here is a picture of the action, just as step 3 starts: The variable anObject is a reference to the object that was created. That object contains the method speak(). So main() can find and activate speak() with: anObject.speak(); |
QUESTION 12:Does the class HelloObject have a constructor? Click Here after you have answered the question |