need help
package com.codegym.task.task15.task1522;
import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Reinforce the singleton pattern
*/
public class Solution {
public static void main(String[] args) {
}
public static Planet thePlanet;
static {
readKeyFromConsoleAndInitPlanet();
}
// Add static block here
public static void readKeyFromConsoleAndInitPlanet() {
Solution sol = new Solution();
try {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
String a = r.readLine();
if(a.equals(Planet.EARTH) ) {
thePlanet = Earth.getInstance();
}
else if(a.equals(Planet.SUN)){
thePlanet = Sun.getInstance();
}
else if(a.equals(Planet.MOON)){
thePlanet = Moon.getInstance();
}
else thePlanet = null;
}
catch (Exception e){
}
// Implement step #5 here
}
}