fork(2) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. Map<String, List<String >> mdaps = new HashMap<String, List<String >>();
  13.  
  14. List<String > List1 = new ArrayList<String>();
  15. List<String > List2 = new ArrayList<String>();
  16. List<String > List3 = new ArrayList<String>();
  17.  
  18. List1.add("Profile");
  19. List2.add("Applicability");
  20. List3.add("Level 1");
  21.  
  22. mdaps.put("Scored", List1 );
  23. mdaps.put("Scored", List2 );
  24. mdaps.put("Not Scored", List3 );
  25.  
  26. for(Map.Entry<String, List<String>> entry : mdaps.entrySet()){
  27.  
  28. if(entry.getKey().contrains("(Scored)"))
  29. System.out.println(entry.getKey()+" "+ entry.getValue());
  30. }
  31. }
  32. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:28: error: cannot find symbol
              if(entry.getKey().contrains("(Scored)"))
                               ^
  symbol:   method contrains(String)
  location: class String
1 error
stdout
Standard output is empty