当前位置:网站首页>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
边栏推荐
- Chapter VI, Section III pointer
- 第四次作业
- Peut recevoir plusieurs paramètres de type de données - paramètres variables
- Five tips for cross-border e-commerce in 2022
- Idea view history [file history and project history]
- JSON related
- Do you really understand hashcode and equals???
- Initial experience of talent plan learning camp: communication + adhering to the only way to learn open source collaborative courses
- 2022 团体程序设计天梯赛 模拟赛 L2-1 盲盒包装流水线 (25 分)
- C abstract class
猜你喜欢
![Super easy to use [general excel import function]](/img/9b/ef18d1b92848976b5a141af5f239b5.jpg)
Super easy to use [general excel import function]

Why is bi so important to enterprises?
![General test technology [II] test method](/img/b7/f661f446616ad6bfbbf48eb03ea82d.png)
General test technology [II] test method

Explanation keyword of MySQL

JS - accuracy issues

Redis(17) -- Redis缓存相关问题解决

浅学一下I/O流和File类文件操作

Development record of primary sensitive word detection

12. < tag linked list and common test site synthesis > - lt.234 palindrome linked list

关于idea调试模式下启动特别慢的优化
随机推荐
Iotos IOT middle platform is connected to the access control system of isecure center
The query type of MySQL is very inefficient.
C abstract class
全新的ORM框架——BeetlSQL介绍
. NETCORE sets the API post mode, which can accept parameters directly in parentheses
socket编程 send()与 recv()函数详解
AWS from entry to actual combat: creating accounts
2022 团体程序设计天梯赛 模拟赛 1-8 均是素数 (20 分)
. net webapi access authorization mechanism and process design (header token + redis)
PYMOL-note
Unity games and related interview questions
The fourth operation
File upload vulnerability summary and upload labs shooting range documentary
Supersocket is Use in net5 - concept
Flink real-time data warehouse project - Design and implementation of DWS layer
Section 1 array and slicing in Chapter 6
Unity basics 2
TCP three handshakes and four waves
Flink customizes the application of sink side sinkfunction
Applet - WXS