这个课程的参考视频和图片来自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

 

[Java in NetBeans] Lesson 11. While Loops的更多相关文章

  1. [Java in NetBeans] Lesson 10. For Loops

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有:(the same use in C/C++) 1. x++, x += 1; similar x--, x -= 1; x *= 2 ...

  2. [Java in NetBeans] Lesson 07. JavaDoc and Unit Tests

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. organize code into packages Create a package if want to make th ...

  3. [Java in NetBeans] Lesson 00. Getting Set-up for Learning Java

    这个课程的参考视频在youtube. 主要学到的知识点有: set up needs Java SE JDK, NetBeans IDE class name should be the same l ...

  4. [Java in NetBeans] Lesson 17. File Input/Output.

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: We want to handle the bad Error. (e.g bad input / bugs in program) ...

  5. [Java in NetBeans] Lesson 16. Exceptions.

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: We want to handle the bad Error. (e.g bad input / bugs in program) ...

  6. [Java in NetBeans] Lesson 15. Sorting and Searching.

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Build in functions in java.util.Collections Need to implement a co ...

  7. [Java in NetBeans] Lesson 09. Switch / If-Else Ladder

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. Nested If-else statement (if-else ladder) /** * 90 and above == ...

  8. [Java in NetBeans] Lesson 06. Custom classes

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Constructors: A special method called when an object of the class ...

  9. [Java in NetBeans] Lesson 05. Method/function

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Define a method:(motivation: write one time, but use it many times ...

随机推荐

  1. go 的 mysql 的简单操作

    关于 sql:https://studygolang.com/articles/3022 异常处理: http://www.jianshu.com/p/f30da01eea97 一.数据库的连接及初始 ...

  2. ArcGIS AddIn开发笔记(一)

    学习AddIn开发,遇到了些稀奇古怪的问题,网上的资料少之又少. (1)AddIn开发,主要是通过ArcMap静态变量,与主程序中的数据等进行交互 (2)failed to register Add ...

  3. django高并发优化

    我开始对web开发产生了兴趣,并决定自己也尝试开发一个网站.在此之前,我做过3年的java application的开发,对web开发应该算一无所知.在比较了java,php,ror,和python后 ...

  4. [No0000D8]rar合并到JPG.bat用图片隐藏文件

    echo off cls echo 请拖入jpg图像文件后回车: set /p imagefile= echo 请拖入rar文件后回车: set /p rarfile= copy /b %imagef ...

  5. tensorRT使用python进行网络定义

  6. event.stopPropagation(),event.preventDefault()和return false的区别

    event.stopPropagation(),event.preventDefault()和return false的区别 1.event.stopPropagation()方法 这是阻止事件的冒泡 ...

  7. 【视频】dx dy的意思 微分的定义 导数符号的意思

    视频解说 http://www.bilibili.com/video/av8565224/

  8. hbase本地模式-安装及基本测试

    解压缩hbase二进制安装文件到/opt目录下: #tar -zxvf hbase-0.98.6-cdh5.3.6.tar.gz -C /opt/cdh-5.3.6/ 编辑配置文件,这里仅配置数据目录 ...

  9. day6:前两小节补充

    1,练习题一:以66分割,大于部分一个键值对,小于部分一个键值对 li = [23,78,67,45,34,89,67,78,23,23] lig = [] lil = [] dic = {} for ...

  10. jc公共

    1.前端和后端交互 var listparm = new DataParam("MyTableList", ddl.ToString()); var ridparm = new D ...