Cause check of unreachable statement exception in Java

Unsaid statement exceptions:
Reason 1:
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!!

Read More: