Unable to extend from a file that has no public class
<p>Test.java and B.java are in default package.</p>

<p>File Test.java(as we can give any name for a file that has no public class) contains:</p>

<pre><code>class A{}    
</code></pre>

<p>File B.java contains:</p>

<pre><code>class B extends A{}
</code></pre>

<p>If I compile B.java it gives an error saying:</p>

<pre><code>B.java:1: error: cannot find symbol    
class B extends A{   
                ^
symbol: class A
1 error
</code></pre>

<p>What is the problem with the code? Please help me out!</p>
