Card 46 / 54: 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:
A) public int method1(int a, int b) {return 0; }
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |