title: subclasses of abstract class in java
body: <p>I am reading my former developers code.
  There are several different subclasses like "numeric","Decimal" under a abstract class "element".
  there is a segment of code like below.</p>
  
  <pre><code>for (Iterator i = children.iterator(); i.hasNext();) {
              Element element = (Element) i.next();
              for (int j = 0; j &lt; element.getOccurs(); j++) {
                  int end = pos + element.getLength();
                  dataChildren.add(element.parse(sub(bytes, pos, end)));
                  pos = end;
              }
          }
  </code></pre>
  
  <p>My question is which subclasses it will call when execute this "element.parse(sub(bytes, pos, end)"?</p>