Не могу понять почему валидатор ругаеться : Если введенная строка равна "earth", присвоить переменной thePlanet соответствующий объект. Помогите разобраться.
package com.javarush.task.task15.task1522;
public class Sun implements Planet {
private static Sun instance = null;
private Sun() {}
public static Sun getInstance() {
if (instance == null) {
instance = new Sun();
}
return instance;
}
}