Just simply fill in the missing code ...
package com.twisters;
class Base {
public int a;
public int getA(){
return a;
}
}
public class Child extends Base{
private int a;
Child(int value){
/* Code goes here */
}
public static void main(String[] args) {
Base b = new Child(10);
System.out.println(b.getA()); //This should print 10
}
}
Got an answer? Why don’t you leave it here.