这个课程的参考视频和图片来自youtube

主要学到的知识点有:(the same use in C/C++)

1. while loop

  • while(i < max){} will keep executing if i < max is true, otherwise will jump out from the while loop. Possible execute 0 times.
max = 5;
i = 0;
while(i < 5){
System.out.printf("%d ", i);
i++;}
// the result will be like this
0, 1, 2, 3, 4
  • do {} while (i < max) is similar like before, only difference is that the loop body will be execute at least once.
  • while(true) { if (i < max) {break;}}   Whenever see break; will jump out from the while loop.
max = 5;
i = 0;
while(true){
System.out.printf("%d ", i);
i++;
if (i >= max){
break;}}
// the result will be like this
0, 1, 2, 3, 4

 

最新文章

  1. 打造高效前端工作环境-tmuxinator
  2. Linux实战问题解决方案(1):Could not get lock
  3. Hihocoder 1079 离散化
  4. easyui 中datagrid 点击行的事件
  5. angularjs实战
  6. Android中实现控件圆角边框
  7. Hibernate 持久化对象的状态
  8. Scala 编程(二)类和对象
  9. 安装sql server 2008 management studio时,提示升级VS2008 到 SP1
  10. paip.c++ qt messagebox用法
  11. V5
  12. leetcode(58)-Range Sum Query - Immutable
  13. Spring Boot笔记八:表单验证
  14. 只有设置了 name 属性的表单元素才能在提交表单时传递它们的值
  15. MDK编译过程
  16. Java并发编程(十)阻塞队列
  17. maven dependencies 报错
  18. ExtJS 4.2 教程-06:服务器代理(proxy)
  19. AngularJs - Javascript MVC 框架
  20. datatable删除一行方法

热门文章

  1. js中parseInt和Number
  2. 微信jssdk上传图片,一张一张的上传 和 一次性传好几张
  3. 有时候不用explode截取字符串了,可以用用substr()
  4. http://linux-mtd.infradead.org/doc/nand.html nand
  5. .NET Core开发日志——HttpClientFactory
  6. ubuntu16.04编译安装imu_tk
  7. [No0000D2]ClearCSharp编程清理脚本批处理bat
  8. flex-shrink (适用于弹性盒模型容器子元素)
  9. OLW Test
  10. Cookie映射