class SuperX { private int Uvw() { return 7; } } class SubY extends SuperX { public int Uvw() { return 11; } } class SubZ extends SubY { public static void main(String[] args) { SuperX obj = new SubY(); System.out.println(obj.Uvw()); // Uvw not accessible } }