I have two classes:
abstract class A
{
private int a;
protected int get(){return a;}
}
class B extends A
{
private int a = 2;
}
What i want is to inherit get() method which would give me the result 2 instead of 0. I know why this code is not working but have no idea is it even possible to make this kind of trick in java.