
/* class B extends class A - thus inherits the properties of A */

class B extends A {
	int j = 5;
	//int i = 0;                        // override i in class A

	B (int j ) {
		this.j = j;
	}

	B (int i, int j) {
		super(i);                       // call A's constructor
		this.j = j;
	}
		
	void printJ() {
		System.out.println(j);
	}

	@Override
	void printI() {                     // override A's printI() method
		super.printI();                 // call A's printI() method
		System.out.println("hacked");
	}

    /* overloading (not overriding - different signature) A's printYo() method */
	void printYo(String str) {
		System.out.println("yo " + str + "!");
	}
}
