How does JAXB simplify working with XML in Java?
A) By allowing Java objects to be converted to and from XML
B) By providing a tree structure for XML documents
C) By offering a streaming interface for XML processing
D) By defining the structure of XML documents
Answer:
A) By allowing Java objects to be converted to and from XML
Explanation:
JAXB (Java Architecture for XML Binding) simplifies working with XML by allowing Java objects to be converted to and from XML. It uses annotations to map Java classes to XML elements and attributes, making it easy to serialize and deserialize XML documents to Java objects.