fork(2) download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class SuperClass {
  5.  
  6. }
  7. class SubClassA extends SuperClass {
  8.  
  9. }
  10.  
  11. class SubClassB extends SuperClass {
  12.  
  13. }
  14.  
  15. class Main
  16. {
  17. static private HashMap<String, SuperClass> mapOfRoles = new HashMap();
  18. static public void X()
  19. {
  20. mapOfRoles.put("try", new SubClassA());
  21. mapOfRoles.put("again", new SubClassB());
  22. }
  23.  
  24. public static void main (String[] args) throws java.lang.Exception
  25. {
  26. X();
  27.  
  28. }
  29. }
Success #stdin #stdout 0.02s 245632KB
stdin
Standard input is empty
stdout
Standard output is empty