if(strings.size() == stringSet.size()) { //strings.containsAll(stringSet) // strings.size() == stringSet.size()
System.out.println("Òåñò ïðîéäåí.");
} else {
System.out.println("Òåñò íå ïðîéäåí.");
}
package com.javarush.task.task33.task3310;
import java.util.HashSet;
import java.util.Set;
public class test {
public static void main(String[] args) {
Set<String> someSet = new HashSet<>();
someSet.add("one");
someSet.add("two");
someSet.add("three");
Set<String> otherSet = new HashSet<>();
otherSet.add("one");
otherSet.add("two");
otherSet.add("three");
System.out.println(someSet.containsAll(otherSet));
}
}