Error:
solution:
1. Open the eclipse toolbar window-> preferences
2. Open java-> compiler
3. Select the compiler compliance level of 1.6 or higher (here choose 1.8)
4. Click apply and close to save your changes, you can
Reproduced in: https: //www.cnblogs.com/MFlowers/p/11039977.html