Unreachable statement error in java

Hello guys, I have face issue Called as unreachable statement error in java. How to resolve this problem.

Hi,
You have a semi-colon after the if which means the break statement executes always and so the following statements never executes.
This is what your IDE tells you.
image

3 Likes

Thanks for your reply :v:t2: