Question: Take a look at the class declaration below: package p2; import p1.Test8; package p3; import p1.Test8; import p2. Test9; package p1; class Test8{ int i;

Take a look at the class declaration below: package p2; import p1.Test8; package p3; import p1.Test8; import p2. Test9; package p1; class Test8{ int i; private int j; protected int k; public int I; } class Test9 extends Test8 { } class TestDemo3{ public static void main(String args[]X Test8 t8 = new Test8(); Test9 t9 = new Test9(); } Out of these 4 variables declared in Test8, which are accessible in Test9 directly and by creating Test8 reference? In TestDemo3 main function, which variables can be used by each of the references t8 and t9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
