In Java
1. Which term best describes a \"A uses B\" class relationship? wordanswer:
2. choose correct one:
What are some of the ways a class can exhibit dependency?
A. A class can invoke the methods of another class.
B. A method within a class can accept an object of the sameclass.
C. A class can rely on a constant defined in another class.
D. All of the above.
Which if the following statements is FALSE regarding arrays ofobjects?
A. Objects stored in an array are automatically instantiatedwhen the array is created.
B. Attempting to print out an empty array of objects willgenerate a NullPointerException.
C. An array of objects initially holds null references.
D. An array of objects is actually an array of references to theobjects.
What symbol changes a typical parameter to a variable parameterlist?
A :
B *
C ...
D ?
Which of the following rules is TRUE regarding variableparameter lists?
A. A variable parameter list can appear in any order in a listof formal arguments.
B. A method can only have one variable parameter list in itslist of formal parameters.
C. A variable parameter list can be the only formal argument ina method.
D. You cannot use a variable parameter list in aconstructor.
3. Fill in the Blanks
The keyword [_____] is used to establish an inheritancerelationship.
The existing class is also known as the [_____] class.
4. When should the protected modifier be used?
A. When you want all classes to access variables or methods fromany other classes.
B. When you want a derived class to access a variable or methodfrom the (originally) existing class.
C. When you don't want any variable or method to be accessibleoutside the class.
D. When you want a single method or variable to be shared amongall objects.
5. The super reference is typically used by the child class tocall which type of method? Word Answer:
6. Fill in the Blanks
A new method must have the same [_____] as the existing methodin order to perform overriding..