// in file base.java
package p1;
import java.io.*;
import java.util.*;
public class base
{
int n=1;
public int n1=3;
public base()
{
System.out.println("fdfs"+n1);
}
public static void main(
String args[])
{
base obj=new base();
}
}
// in file derived.java
package p1;
import java.io.*;
public class derived extends base
{
derived()
{
System.out.println("asfsdf"+n1);
}
public static void main(String args[])
{
derived obj1=new derived();
}
}
i put both the files in a folder named p1.
compiled the base.java successfully.
When i try compiling derived.java, it shows an error stating that it cannot find symbol "base".
Please tell me the reason for this..
Thanks