When I test the class run, the following error occurs:

Possible cause: Java version inconsistencies The project builds the configuration using the wrong version of Java
Solution:
Step 1: File –Project Structure– Project (2 versions are changed to the same: the numbers in the second and third bars are 11)

File — –Project Structure– Modules (second bar changed from 9 to 11 as in Project)

Step 2: File– Setting– build, execution, deployment– Java Compiler (right-most, Target bytecode version 5)


Possible cause: Java version inconsistencies The project builds the configuration using the wrong version of Java
Solution:
Step 1: File –Project Structure– Project (2 versions are changed to the same: the numbers in the second and third bars are 11)

File — –Project Structure– Modules (second bar changed from 9 to 11 as in Project)

Step 2: File– Setting– build, execution, deployment– Java Compiler (right-most, Target bytecode version 5)

Read More:
- Idea error: Java: compilation failed: internal java compiler error
- Error: unable to resolve dependency for… Could not resolve project
- QGIS uses qt4.6.3 to upgrade to the version compiled by qt4.8.3
- javac Task Error source release 1.7 requires target release
- Solve gradle project refresh failed
- Jdk11, using JavaFX in eclipse
- Eclipse .java File Syntax error, parameterized types are only available if source level is 1.5 or
- Syntax error, insert “Finally” to complete TryStatem in Myeclipse in Java-
- ISDEV : fatal error -6109: Internal build error
- import org.junit.Test And @ test error reporting — solutions
- Failed to resolve: com.android.support:appcompat-v7:25.3.0
- yarn install gyp verb `which` failed python2 Error: not found: python2
- How to turn your project into a jar package in idea
- The import Maven project appears http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Solutions
- Project error – failed to find build tools revision 26.0.1
- JavaFX 11: “missing JavaFX runtime component”
- Syntax error, annotations are only available if source level is 1.5 or greater.
- “Method does not override method from its superclass”
- Module parse failed:Unexpectedtoken (1:0)You may need an appropriate loader to handle this file type
- Troubleshooting of Jenkins upgrade to 2.42 JUnit test report