关于解决Syntax error, annotations are only available if source level is 5.0 错误


1.关于解决Syntax error, annotations are only available if source level is 5.0 错误
解决办法:Project->Properties->Java Compiler->Compiler Compliance Level选择5.0或者以上的jdk版本
Project->Java Build Path->Libraries->Add Library...->JUnit->Select "JUnit 4.0"->Finish 经过以上设置后可顺利解决问题。

你可能感兴趣的:(Annotations)