做Java那么多年了,还是第一次遇到这样的问题
StringBuffer query = new StringBuffer(768);
query.append("12312312");
以上第二句代码报错:The type Comparable is not generic, it cannot be parameterized with arguments<string>
百思不得其解。
在一个过期很长时间的论坛里找到了这样的回答:
The problem is related with classpath.
You should right click on the project in Eclipse and select properties,
select "Java Build Path" then click the "Order and Export" tab and move the java runtime to top of the jar list.
After that, rebuild your project.
作者在使用Java StringBuffer时遇到了参数化错误,在线求助并分享了解决方案:调整Eclipse项目的Java构建路径设置,将Java运行时移至JAR列表顶部。
1万+

被折叠的 条评论
为什么被折叠?



