11.
What will be the output?
class One{
      final int a = 15;
}

class Two extends One{
      final int a = 20;
}

public class Test extends Two{
      final int a = 30;

      public static void main(String args[]){
            Test t = new One();
            System.out.print(t.a);
      }
}

12.
What will be the output?
class A{
      int i = 10;
      public void printValue(){
            System.out.print("Value-A");
      }
}

class B extends A{
      int i = 12;
      public void printValue(){
            System.out.print("Value-B");
      }
}

public class Test{
      public static void main(String args[]){
            A a = new B();
            a.printValue();
            System.out.print(a.i);
      }
}

13.
What will be the result after compiling this code?
class SuperClass{
      public int doIt(String str, Integer... data)throws Exception{
            String signature = "(String, Integer[])";
            System.out.println(str + " " + signature);
            return 1;
      }
}

public class Test extends SuperClass{
      public int doIt(String str, Integer... data){
            String signature = "(String, Integer[])";
            System.out.println("Overridden: " + str + " " +signature);
            return 0;
      }

      public static void main(String... args){
            SuperClass sb = new Test();
            sb.doIt("hello", 3);
      }
}

14.
class A{
      A(String s){}

      A(){}
}

1. class B extends A{
2.       B(){}
3.       B(String s){
4.             super(s);
5.       }
6.       void test(){
7.             // insert code here
8.       }
9. }
Which of the below code can be insert at line 7 to make clean compilation ?

15.
Determine output:
class A{
      public void printValue(){
            System.out.println("Value-A");
      }
}
class B extends A{
      public void printNameB(){
            System.out.println("Name-B");
      }
}
class C extends A{
      public void printNameC(){
            System.out.println("Name-C");
      }
}

1. public class Test{
2.       public static void main (String[] args){
3.             B b = new B();
4.             C c = new C();
5.             newPrint(b);
6.             newPrint(c);
7.       }
8.       public static void newPrint(A a){
9.             a.printValue();
10.      }
11. }