Java解决方案

1.新建模板类提示版本太低

Syntax error, type parameters are only available if source level is 1.5

当我的eclipse使用jdk1.6的时候,创建泛型类,系统会提示错误:

“Set project compiler compliance settings to '1.5'”

“Syntax error, type parameters are only available if source level is 1.5”

这时候需要改动两个地方:

1.右击项目-->properties-->java compiler -->选择enabel project specific setting -->Compiler compliance level :选择1.5版本,其他默认

2.右击项目-->properties -->project facets-->java后的下拉框选择为5.0

然后再clean一下工程就好了

原文地址:https://www.cnblogs.com/TQCAI/p/7606734.html