/ ** * @author 031202 * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates * / public class Test {public static void main (String [] args) { Base b = new subclass (); system.out.println (bx); system.out.println (b.method ());}}
Class base {INT x = 2;
INT method () {returnix x;}}
Class Subclass Extends Base {INT X = 3;
INTMETHOD () {Return x;}} answer: 23