• + 1 comment

    Since this question has been revised, can someone tell me why this is not correct due to the current description? Error information has been included:

    class Adder extends Arithmetic {

    int add(int one, int two) { return one + two; }

    }

    Error output:

    Solution.java:11: error: cannot find symbol class Adder extends Arithmetic { ^ symbol: class Arithmetic Solution.java:6: error: cannot find symbol System.out.println("My superclass is: "+X.getClass().getSuperclass().getName());
    ^ symbol: method getClass() location: variable X of type Adder 2 errors