任何想法为什么跟随行有相关的错误信息?谢谢.
码
Map<int,boolean> buffer = new HashMap<int, boolean>();
Run Code Online (Sandbox Code Playgroud)
错误信息
Description Resource Path Location Type
Syntax error, insert "Dimensions" to complete ReferenceType
Run Code Online (Sandbox Code Playgroud)
你的代码应该是这样的:
Map<Integer,Boolean> buffer = new HashMap<Integer, Boolean>();
Run Code Online (Sandbox Code Playgroud)
您不能使用具有通用性的原始类型.
您需要为它们使用Wrapper类.