hi,
wht's the o/p of this?can any one explain the flow of pgm?
// file TestA.java
package a;
public class TestA {
protected int i = 1;
}// file TestB.java
package b;
import a.TestA;
public class TestB extends TestA {
static int i = 2;
public static void main(
String[] args){
TestB testB = new TestB();
testB.test();
TestC testC = new TestC();
testC.test();
}
public void
test(){
System.out.println("TestB i=" + i);
}
static class TestC{
static int i = 3;
public void test(){
System.out.println("TestC i=" + i);
}
}
}