Java, advanced Structures 6. A/an ____ class defined in a method signals to the
ID: 3691475 • Letter: J
Question
Java, advanced Structures
6. A/an ____ class defined in a method signals to the reader of your program that the class is not interesting beyond the scope of the method.
Select one:
a. A class cannot be defined within a method
b. abstract
c. interface
d. inner
7. What is the purpose of making an inner class static?
Select one:
a. to create an outer-class reference
b. to create a this reference to itself
c. to prevent storage of an outer-class reference that is not needed
d. to create an outer-class reference that is needed
8.Consider the following code snippet:
myImage.add(new Rectangle(10,10,10,10));
This code is an example of using ____.
Select one:
a. An anonymous class.
b. An anonymous object.
c. An abstract object.
d. An abstract class.
9. A method local inner class can access local variables from the enclosing scope only if they are declared as ____.
Select one:
a. private
b. public
c. static
d. final
10. What is never present in a static inner class?
Select one:
a. an outer-class reference
b. the this reference to itself
c. static properties
d. static methods
Explanation / Answer
Answer:
---------------
6.d. inner
7A.to create an outer-class reference
8.b. An anonymous object.
9.d. final
10.a. an outer-class reference
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.