• + 0 comments

    public class Solution {

    public static void main(String[] args) {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        Adder adder = new Adder();
        System.out.println("My superclass is: "+adder.getClass().getGenericSuperclass().getTypeName());
        System.out.println(adder.add(40, 2)+" "+adder.add(10, 3)+" "
        +adder.add(10, 10));
    } 
    

    }

    class Arithmetic{ int add(int a, int b){ return a+b; } }

    class Adder extends Arithmetic{

    }