You are viewing a single comment's thread. Return to all comments →
The "hidden" main method is looks like this;
public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException { Scanner sc = new Scanner(System.in); String className = sc.next(); StringBuilder sb = new StringBuilder(); sb.append("hackerrank.java.advanced."); sb.append(className); State state = (State) Class.forName(sb.toString()).newInstance(); Flower flower = state.your_National_Flower(); System.out.println(flower.whats_Your_Name()); sc.close(); }
Seems like cookies are disabled on this browser, please enable them to open this website
Covariant Return Types
You are viewing a single comment's thread. Return to all comments →
The "hidden" main method is looks like this;