plz send me the code...
then i can explain u clearly...
and one more thing , plz mention the jre environment and default classpath .................
send me my requirements i am online
thannnkkkkkkkkkkkkkkkkssssssssssssssssssssssssss
//file name a1.java
package p1;
public class a1{
int a=1;
public int b=2;
private int c=4;
protected int d=3;
public a1()
{
System.out.println("a="+a+"b="+b+"c="+c+"d="+d);
}
}
//file name a2.java
package p1;
class a2 extends p1.a1
{
a2()
{
System.out.println("a="+a);
}
}
//file name demo.java
package p1;
public class demo
{
public static void main(String args[])
{
a1 ob1=new a1();
a2 ob2=new a2();
}
}
CLASSPATH
/bin/jdk1.6.0/bin/ //for jdk
/bin/jdk1.6.0/jre/lib/ //for runtime
.:/wind/javapgm/ //package p1(directory) exists in javapgm