Deeper Inside JavaBean - Quiz Explanation

The correct answers are indicated below, along with the text that explains the correct answers.
1. What type of information must a Bean expose for introspection purposes?
  A. Public properties, methods, and events.
  B. Static properties and methods.
  C. All members.
  The correct answer is A.
Public properties, methods, and events must be exposed by a Bean for introspection purposes. B is incorrect because static properties and methods have no special relevance to introspection. C is incorrect because Beans typically only want to expose specific properties, methods, and events, rather than all of their members.


2. Design patterns dictate:
  A. The efficiency of a method's design.
  B. The name and type signature of public methods.
  C. How private methods interact with Bean data.
  The correct answer is B.
Design patterns dictate the name and type signature of public methods. A is incorrect because design patterns have nothing to do with the efficiency of a method's design. C is incorrect because design patterns only apply to public methods.

3. Property design patterns are closely related to:
  A. Accessor methods.
  B. Events.
  C. Event design patterns.
  The correct answer is A.
Property design patterns are closely related to accessor methods since accessor methods are required to follow property design patterns. B and C are incorrect because events aren't directly related to property design patterns.