что тут не так??
package com.javarush.task.task15.task1522;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Закрепляем паттерн Singleton
*/
public class Solution {
public static void main(String[] args) {
}
public static Planet thePlanet;
static {
readKeyFromConsoleAndInitPlanet();
}
public static void readKeyFromConsoleAndInitPlanet() {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {
String str = reader.readLine();
switch (str) {
case Planet.SUN -> thePlanet = Sun.getSun();
case Planet.EARTH -> thePlanet = Earth.getEarth();
case Planet.MOON -> thePlanet = Moon.getMoon();
default -> thePlanet = null;
}
} catch (IOException e) {
e.printStackTrace();
}
}
}