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?
  1. This data is well-formed.

  2. This data is valid.

  3. This data is dy-no-mite!

2:What method reads all of the elements that are enclosed within a parent element?
  1. get()

  2. getChildElements()

  3. getFirstChildElement()

3:What method of the Elements class can be used to determine the number of elements that it contains?
  1. count()

  2. length()

  3. size()

Answers

A1: 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 ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.