fork download
  1. import java.util.*;
  2. class HashSetTest2 {
  3. public static void main(String [] args){
  4. HashSet hs=new HashSet();
  5. hs.add("B");
  6. hs.add("A");
  7. hs.add("D");
  8. hs.add("E");
  9. hs.add("F");
  10. hs.remove("K");
  11. System.out.println(hs);
  12.  
  13. }
  14. }
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
[D, E, F, A, B]