title: JAXB : Is the annotation @XmlAccessorType is only for Serialization and nothing to do with Binding of data?
body: <p>I wanted to know why do we need to specify the Annotation @XmlAccessorType when working with JAXB .</p>
  
  <p>When i googled for this  i found out this description from a  website stating this 
  <strong>@XmlAccessorType sets default field and property serializability. By default, JAXB serializes public fields and properties. By setting @XmlAccessorType, the bean can choose to only allow annotated fields to be serialized.</strong></p>
  
  <p>Here the author mentions that with this annotation it gives control on  serialization . </p>
  
  <p>My question is , so @XmlAccessorType has  nothing to do with the JAXB Binding and Unbinding from XML to java and java to XML , and it is all about Serialization only .</p>