|
What object is being referred to in the statement:
A good answer might be:This statement occurs in the program after the object has been created, so str1 refers to that object. | |
Using a Reference to an ObjectOnce the object has been created (with the new operator), the variable str1 refers to an existing object. That object has several methods, one of them the length() method. A String object's length() method counts the characters in the string.
| |
QUESTION 9:What is printed to the monitor by the above program? (You might want to copy-paste-and-run the program to check your answer.) Click Here after you have answered the question |