javac fail to detect the following:
ClassA{
private int doRead();
}
ClassB extends ClassA{
protected int doRead();
}
Once compiled, calling classB.doRead() gives unexpected results. See attachement for the implementation I used to discover the problem.
Also tested using:
[ja120114@localhost grizzly]$ java -version
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b77
Under
[ja120114@localhost grizzly]$ uname -a
Linux localhost.localdomain 2.4.20-18.8 #1 Thu May 29 07:40:27 EDT 2003 i686 i686 i386 GNU/Linux
ClassA{
private int doRead();
}
ClassB extends ClassA{
protected int doRead();
}
Once compiled, calling classB.doRead() gives unexpected results. See attachement for the implementation I used to discover the problem.
Also tested using:
[ja120114@localhost grizzly]$ java -version
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b77
Under
[ja120114@localhost grizzly]$ uname -a
Linux localhost.localdomain 2.4.20-18.8 #1 Thu May 29 07:40:27 EDT 2003 i686 i686 i386 GNU/Linux