Which of the following is a good use for an anonymous class?
A) Use an anonymous class to implement polymorphism.
B) Use an anonymous class to implement a callback.
C) Use an anonymous class when all methods of the class will be static methods.
D) Use an anonymous class when the program will only need one object of the class.
Correct Answer:
Verified
Q22: If you have multiple classes in your
Q23: Which of the following statements about an
Q24: The method below is designed to print
Q25: Assuming that interface Resizable is declared elsewhere,
Q26: Which of the following statements about a
Q28: Which of the following statements about an
Q29: You wish to implement a callback method
Q30: _ occurs when a single class has
Q31: Consider the following declarations: public interface Displayable
{
Void
Q32: Consider the following code snippet: myImage.add(new Rectangle(10,10,10,10));
This
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents