當我的eclipse使用jdk1.6的時候,創(chuàng)建泛型類,系統(tǒng)會提示錯誤:
“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