Public constructor for nested class
<p>I'm parsing a JSON and bumped into an exception saying I don't have default constructor for one of my entities. Here is the code:</p>

<pre><code>public class MyPromosResponse extends BaseResponse {

    public MyPromosResponseData response;

    public MyPromosResponse() {
    }

    public TreeSet&lt;Promo&gt; getMyPromosResponseData() {
        return new TreeSet&lt;Promo&gt;(response.getEvents());
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    class MyPromosResponseData {
        public ArrayList&lt;Promo&gt; events;
        public ArrayList&lt;Table1PromoData&gt; Table1;

        public MyPromosResponseData() {
        }

        public ArrayList&lt;Promo&gt; getEvents() {
            return events;
        }

        ArrayList&lt;Table1PromoData&gt; getTable1() {
            return Table1;
        }

    }

    class Table1PromoData {
        public int id;
        public int eventid;
        public int cardholderid;

        public Table1PromoData() { // Here is the constructor.
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getEventid() {
            return eventid;
        }

        public void setEventid(int eventid) {
            this.eventid = eventid;
        }

        public int getCardholderid() {
            return cardholderid;
        }

        public void setCardholderid(int cardholderid) {
            this.cardholderid = cardholderid;
        }
    }

}
</code></pre>

<p>When I have <code>Table1PromoData</code> as a nested class I have the error the default constructor can't be found, but there is a public constructor defined. If I move it to a separate file everything is fine - the lib finds the constructor.</p>

<p>Why the default constructor become visible after I moved it to a separate file?</p>
