Quiz
To see whether you took a big enough byte from the tree of knowledge during this hour, answer the following questions about input and output streams in Java.
Questions
1: | Which of the following terms should not be used to complement XML data that is properly formatted?
This data is well-formed.
| 2: | What method reads all of the elements that are enclosed within a parent element?
| 3: | What method of the Elements class can be used to determine the number of elements that it contains?
|
AnswersA1:
| c. Well-formed data has properly structured start and end tags, a single root element containing all child elements, and an ?XML declaration at the top. Valid data follows the rules of a particular XML dialect. "Dy-no-mite!" is the catchphrase of the comedian Jimmie "J.J." Walker. | A2:
| b. The getChildElements() method returns an Elements object holding all of the elements. | A3:
| c. Just like vectors, Elements uses a size() method that provides a count of the items it holds. |
|