1.

class A { protected int method1(int a, int b) { return 0; } }
Which is valid in a class that extends class A?

A. public int method1(int a, int b) {return 0; }
B. private int method1(int a, int b) { return 0; }
C. public short method1(int a, int b) { return 0; }
D. static protected int method1(int a, int b) { return 0; }
Answer» B. private int method1(int a, int b) { return 0; }


Discussion

No Comment Found

Related MCQs