Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Set

Set<String> names = new HashSet<>();
names.add("John");
names.add("Jack");
names.add("John");
System.out.println(names); // [John, Jack]

names.remove("John");

boolean contains = names.contains("Jack"); // true

for (String name: names) {
    System.out.println(name);
}
Source by github.com #
 
PREVIOUS NEXT
Tagged: #Set
ADD COMMENT
Topic
Name
5+7 =