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

主要学到的知识点有:

1. Array: container that holds a fixed number of values of the same type, can be access by index.

  • Create a string array and initialize the elements one by one. Index will be start from 0 to size -1.
String[] names = new String[3];
names[0] = "Tom";
names[1] = "Bob";
names[2] = "Joe";
// Below is a wrong comment
names[3] = "wrong!" // Will show error because out of the index.
  • Automatic detect the size of the array
String[] names = new String[]{"Tom", "Bob", "Joe"};

2. Go through the elements in the array.

  • for loop using index
for ( int i = 0; i < names.length; i ++){
System.out.printf("%s ", names[i]);
}
// the result will be like this
Tom, Bob, Joe
  • for loop using "foreach"
for ( String each : names){
System.out.printf("%s ", each);
}
// the result will be like this
Tom, Bob, Joe
 

[Java in NetBeans] Lesson 12. Arrays的更多相关文章

  1. [Java in NetBeans] Lesson 13. Multidimensional Arrays

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. Multidimensional Array: Array that has more than one dimension. ...

  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. Python基础爬虫

    搭建环境: win10,Python3.6,pycharm,未设虚拟环境 之前写的爬虫并没有架构的思想,且不具备面向对象的特征,现在写一个基础爬虫架构,爬取百度百科,首先介绍一下基础爬虫框架的五大模块 ...

  2. 证书文件(pfx)读取时报 “指定的网络密码不正确”

    实际情况: 1.本地测试正确,发布到windows server 2003 iis6 可以正常运行 发布到 windows server 2008 上 II7就报 “指定的网络密码不正确” 日志报错为 ...

  3. weblogic初学笔记2-在Linux上部署项目

    一.这两天在做部署项目到Linux服务器上. 网上有用war包部署的,也有把war包解压之后部署的.比如:http://www.cnblogs.com/xdp-gacl/p/4143413.html ...

  4. 洛谷P1088 火星人【STL】【思维】

    题目:https://www.luogu.org/problemnew/show/P1088 题意: 给定一个n个数的排列,要求得到这之后的第m个排列. 思路: next_permutation的简单 ...

  5. VIVE pro和hololens购买调研

    VIVE pro专业版是一款虚拟现实头盔 VIVE Pro专业版头显 ¥6,488 仅含头显,不含定位器及操控手柄送VIVEPORT会员服务2个月 订购VIVE Pro专业版头显,加 ¥2,400可得 ...

  6. set @sql=N'q',这里的N是什么意思,加与不加有什么区别

    用来支持UNICODE字符的,不加的话,如果sql语句中有Unicode字符会认不出来

  7. [linux] 对一个虚拟机的研究

    今天拿到了一个vmware的虚拟机硬盘镜像,是其他公司的演示产品. 启动之后是带着ubuntu字样的grub.进入系统之后也不是shell,而是一个定制的命令行.所以如果想了解细节的话,只能单独挂硬盘 ...

  8. Oracle 分区表 收集统计信息 参数granularity

    GRANULARITY Determines the granularity of statistics to collect. This value is only relevant for par ...

  9. jmeter发送https请求

  10. Apache SSL 服务搭建

    Web服务器在默认情况下使用HTTP,这是一个纯文本的协议.正如其名称所暗示的,纯文本协议不会对传输中的数据进行任何形式的加密.而基于HTTP的Web服务器是非常容易配置,它在安全方面有重大缺陷.任何 ...