Bean Internals  «Prev 

JavaBeans internals - Quiz

1. The data part of a Bean is important because it:
Please select the best answer.
  A. Is directly accessible by programmers.
  B. Allows programmers access to the internal state of the Bean.
  C. Completely describes the state of the Bean.

2. The most important type of methods for accessing Beans are:
Please select the best answer.
  A. Public methods.
  B. Private methods.
  C. Static methods.

3. An interface is a functionally related group of:
Please select the best answer.
  A. Data.
  B. Beans.
  C. Publically defined methods.

4. Indexed properties often include an additional pair of accessor methods because:
Please select the best answer.
  A. There are so many elements.
  B. It is useful to be able to access either an individual element or the entire array of elements.
  C. It is strictly required that access be granted both to individual elements and the entire array of elements.

5. Individual elements of an indexed property are accessed through an accessor method using:
Please select the best answer.
  A. An integer index.
  B. The location of the previous element.
  C. The name of the element.

6. Bound properties are considered bound because they:
Please select the best answer.
  A. Have limits on their values.
  B. Can't be written to.
  C. Notify an outside party whenever their value changes.

7. To reject the new value of a constrained property, a constrained property listener must:
Please select the best answer.
  A. Set the property back to its previous value.
  B. Throw a PropertyVetoException.
  C. call the vetoableChange() method.