Syntax error, parameterized types are only available if source level is 1.5)
解決辦法:
在Eclipse中,菜單條 —“Windows” —-“preferneces”
在彈出對話框中 ,在左側列表框中 選擇 “JAVA” —子菜單中 “compiler” …
然後在右側把 “Compiler compliance level” 設置成5.0以上 即可。
設置好以後 刷新下 工程目錄右鍵有個刷新
代碼沒問題 就是編譯器版本的問題.