Kizspy Question: 29
(Choose 1 answer)
What will be the output of the following Java code?
class A {
int a = 5;
public int getA() {
return a;
}//class A
class B extends A {
private int a = 6;
public void rollBackA() {
a++;
a = super.getA();
} //class B
public class Main {
public static void main(String[] args) {
A objA = new A();
B objB =new B();
objB.rollBackA();
System.out.format("%d, %d %n", objA.getA(),objB.getA());
A. 55
B. 6,6
C. 5,6
D. 6,5