Can a static variable of a parent class be accessed from the child class without using the parent class name(classname.variablename)?
For example : -
class Uber
{
static int y = 2;
Uber(int x) { this(); y = y * 2; }
Uber() { y++; }
}
class Minor extends Uber
{
Minor() { super(y); y = y + 3; }
public static void main(
String [] args) {
new Minor();
System.out.println(y);
} }
What should be the output??