Why can't Java find this constructor?
<pre><code>package package.b;
class ClassB {

public ClassB(BaseClass bc, XMLBase obj1) { }
}
</code></pre>

<p><hr></p>

<pre><code>import package.b.ClassB;

class A extends BaseClass {

    public void function() {
        TestXML obj1 = new TestXML();

        ClassB bObj = new ClassB(this, obj1);
    }

}
</code></pre>

<p><hr></p>

<p>When I compile the above code, I get an error "cannot find symbol symbol : constructor ClassB(ClassA, Object1)"</p>

<p>But when I pass "null" for both arguments, it compiles fine.</p>

<p>Why so?</p>

<p>Can anyone help me?</p>

<p>TIA</p>
