当我尝试运行此代码时:
Set<Set<Integer>> s1 = Set.of(Set.of(), Set.of(1));
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
The method of() is undefined for the type Set
The method of(int) is undefined for the type Set
Run Code Online (Sandbox Code Playgroud)
我正在使用 Java 8。出了什么问题?:/