当前位置:网站首页>Three types of jump statements
Three types of jump statements
2022-04-23 03:28:00 【Aiyou coffee】
break: The body of any loop statement , All available break Control the circulation process ,break Used to force out of the loop , And execute the remaining statements in the loop .
Change program control flow . be used for do-while,while,for You can jump out of the loop and execute the following statement ( Judge the entered scores break , If it is less than 0, It will be marked as an error state , And will immediately jump out of the whole for loop )
continue: Statements are used in loop statements , Used to terminate a cycle process , That is to skip the statement that has not been executed in the loop body , Then, the next decision on whether to execute the loop .
return: Exit from current method , Return to the statement that called the method , And continue execution from the next statement of the statement .
Two formats of return statement :
1.return expression: Returns a value to the statement that calls the method ( The data type of the return value must be the same as that in the method declaration The return value type of is consistent or the precision is lower than the declared data type )
2.return: When used in a method declaration void Declare that the return type is null , This return type should be used , It does not return any value .
So the conclusion is :
break:switch sentence , Loop statement
countinue: Loop statement
return: Any statement that ends the current method has nothing to do with the loop
版权声明
本文为[Aiyou coffee]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220619008986.html
边栏推荐
- C set
- socket编程 send()与 recv()函数详解
- oracle 查询外键含有逗号分隔的数据
- Iotos IOT middle platform is connected to the access control system of isecure center
- How to achieve centralized management, flexible and efficient CI / CD online seminar highlights sharing
- The website JS in. Net core cefsharp chromium WebBrowser calls the C method in winfrom program
- JS implementation of new
- QT dynamic translation of Chinese and English languages
- Idempotency practice operation, explaining idempotency based on business
- C-11 problem h: treasure chest 2
猜你喜欢
Peut recevoir plusieurs paramètres de type de données - paramètres variables
QT learning summary
Using swagger in. Net5
Un aperçu des flux d'E / s et des opérations de fichiers de classe de fichiers
淺學一下I/O流和File類文件操作
Database SQL -- simulate inserting a large amount of data, importing / exporting database scripts, timestamp conversion and database basics
Database - MySQL -- Navicat import SQL error 1067 - invalid default value for 'paydate‘
关于idea调试模式下启动特别慢的优化
Build websocket server in. Net5 webapi
Is it difficult to choose binary version control tools? After reading this article, you will find the answer
随机推荐
Unity basics 2
[vs Code] solve the problem that the jupyter file displays exceptions in vs code
Flink customizes the application of sink side sinkfunction
打卡:4.22 C语言篇 -(1)初识C语言 - (11)指针
C abstract class
12. < tag linked list and common test site synthesis > - lt.234 palindrome linked list
Do you really understand hashcode and equals???
PWA I'm here
ThreadLocal 测试多线程变量实例
Punch in: 4.23 C language chapter - (1) first knowledge of C language - (12) structure
Scenario Title: how does system a use the page of system B
Section 2 map and structure in Chapter 6
C-11 problem h: treasure chest 2
oracle 查询外键含有逗号分隔的数据
Supersocket is Used in net5 - command
. net webapi access authorization mechanism and process design (header token + redis)
Development record of primary sensitive word detection
Docker pulls MySQL and connects
MySQL索引详解【B+Tree索引、哈希索引、全文索引、覆盖索引】
Knowledge of software testing~