I'm trying to use Set.of() to create a set of string. Here is my import and code. I don't know why it always reports cannot find symbol:
import java.util.Set;
Set<String> existedFieldsValueList = Set.of("field1", "field2");
Here is the error log
[javac] Set<String> existedFieldsValueList = Set.of("field1", "field2");
[javac] ^
[javac] symbol: method of(String,String)
[javac] location: interface Set
Did I miss anything?