Root Cause:
The version of jre mentioned in the eclipse java compiler and project facet is different.
Solution:
Right click the project -> properties -> project facet and change it into jre version based on your requirement.
Note: Please check the java compiler version also.
Right click on the project -> properties -> java compiler.
Java compiler version and project facet of the project must be same.
Thanks for reading this post……!!!