Home > Java > javaTutorial > body text

Ask the expert - Break and goto

王林
Release: 2024-07-18 19:48:37
Original
722 people have browsed it

Pergunte ao especialista - Break e goto

You say that goto is unstructured and that break with a label offers a better alternative. But, let's face it, doesn't using break with a label, which can result in the removal of many lines of code and nesting levels per break, also destructure the code?

Answer: A quick answer would be: yes! However, in cases where a drastic change in program flow is needed, using break with a label still maintains some structure. The goto statement has none!

The above is the detailed content of Ask the expert - Break and goto. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!