title: how java jaxb works?
body: <p>Just curious about how jaxb works, I have a class annotated as follows:</p>
  
  <pre><code>@XmlRootElement(name = "MyJaxb")
  Class MyJaxb
  {
        @XmlElement
        protected String str;
  
        public void setStr(String str)
        {
             this.str = str;
        }
   }
  </code></pre>
  
  <p>The access modifier of field str is protected, why Jaxb can still marshall and unmarshall it?</p>