Unsaid statement exceptions:
The Java compiler flags an UnreachableStatement as a runtime error, and an unreachablestatement is when the compiler decides it will never execute it.
several things below are said to be unsaid statements:
(1) say the statement after the reutrn statement.
(2) writes the statement after the throw statement.
(3) break, continue statement after defining statement.
(4) “\u10100” // valid, equivalent to ‘\u1010’ and string ‘0’. The
(5) shift operator can be used with long int char short byte. The access control for the
(6) class can be public or nothing.
(7) goto is reserved but not key. Then it’s nothing.
(8) when casting the type of the superclass to an object assigned to a subclass, no exception is compiled, but an exception occurs at runtime.
Reason 2: the
unreachable statement is caused by a return operation that precedes the statement, or by other operations that make it impossible to execute the statement regardless of the condition.
most importantly: check to see if the previous statement returned, and see if any conditions were returned in front of the statement due to your own negligence, even without errors such as syntax.
Because of my own negligence, I have added if or for conditionals several times. Causes the following return statement not to execute any subsequent statements, but to return 1;
as shown in the picture:
must be careful and careful again!!
- The solution of a Java exception has occurred. And error exception in thread when eclipse runs
- Realize the simplest recursive call, simulate exception in thread “main” java.lang.stackoverflowerror exception
- Error: unclassifiable statement in FORTRAN do statement
- error: a label can only be part of a statement and a declaration is not a statement (How to Fix)
- Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax； check the
- [Solved] Mac ES Startup Error: Exception in thread “main“ java.nio.file.NotDirectoryException
- Centos7 network is unreachable
- The @ Autowired annotation in springboot is invalid in ordinary classes. How to solve and use the null pointer exception java.lang.nullpointerexception
- Java command line uses a JNI error has occurred, please check your installation and try again
- iPhone on Windows 10: “Device is unreachable” SOLVED [Debug]
- Java class file operation and exception
- Exception in thread “main“ java.lang.ClassCastException: com.sun.proxy.$Proxy8 cannot be cast to XXX
- java.lang.IllegalStateException Exception: cause analysis and solution
- Request processing failed；nested exception is java.lang.*
- java.lang.IllegalArgumentException : urlcoder exception resolution
- [Java] Java program error: exception_ ACCESS_ VIOLATION (0xc0000005)
- java.lang.Throwable: Substituted for the exception com.bea.xml.SchemaTypeLoaderException which lack
- Java retainAll throws an unsupported operation exception record
- DB2 create table error – 104 42601 illegal symbol encountered in SQL statement
- Method threw ‘java.lang.NullPointerException‘ exception. Cannot evaluate com.sun.proxy.xxx