Is there a way to ignore the 'Unreachable statement' error?

后端 未结 5 526
耶瑟儿~
耶瑟儿~ 2020-12-13 17:41

Is it possible to somehow ignore this error? I find it much easier to just put return in front of the code I don\'t want to run than to comment it (when the com

5条回答
  •  情书的邮戳
    2020-12-13 17:54

    It isn't possible to ignore this error since it is an error according to the Java Language Specification.

    You might also want to look at this post: Unreachable code error vs. dead code warning in Java under Eclipse?

提交回复
热议问题