Olá pessoal estou estudando pra certificação e estou em duvida na resposta da pergunta abaixo :
Por que o item A para zero já que existe quatro declaração essa é minha duvida ?
Se alguem puder me ajudar agradeceria …abs
Section 1: Declarations, Initialization and Scoping > Objective 1.2 > Question 3
Given:
1. abstract class Color {
2. protected abstract String getRGB();
3. }
4.
5. public class Blue extends Color {
6. // insert code here
7. }
And four declarations:
public String getRGB() { return "blue"; }
String getRGB() { return "blue"; }
private String getRGB() { return "blue"; }
protected String getRGB() { return "blue"; }
How many, inserted independently at line 6, will compile?
A) 0
B) 1
C) 2
D) 3
E) 4