Lecture 16
来源:互联网 发布:手动安装windows补丁 编辑:程序博客网 时间:2024/03/29 15:34
CS106A Lecture 17
ARRAY
matrix 2d array
2*3
int[][] Matrix = new int[2][3];
Matrix[0][1] = 5;
Matrix[0]
int[]
for(int i=0; i<2; i++){ for(int j=0; j<3; j++){ Matrix[i][j]=1; }}
matrix 3d array
2*3*100
int[][][] Matrix = new int[2][3][100];
ArrayList
import java.util.*;
template
- 1.5
- 5.0
- 1.6
- 6.0
- 1.x
- x.0
- Java 5.0+
boolean add(<T> element)
- think as a parameterised type; this is just getting replaced with whatever type you instantiate your ArrayList to be
ArrayList<String> sList = new ArrayList<String>();
boolean add(String element)
Methods in the ArrayList Class
- add
- remove
- clear
- size
- get
- set
- indexOf
- isEmpty
Special
ArrayList hold objects
primitive
- int
- duoble
- boolean
- char
class “wrapper”
- Double
- Boolean
- Character
int x=5;
BOXING
Integer y = new Integer(x);
UNBOXING
int z = y.intValue();
- changed in java 5.0
自动装箱/解箱
阅读全文
0 0
- Lecture 16
- CS224d lecture 16札记
- Lecture 16: Recursive Data Types
- Lecture 16 Minimum Spanning Trees
- Scala-3 - 7 - Lecture 2.7 - Evaluation and Operators (16_25)
- Lecture Slides
- Lecture 1
- Lecture 1
- Lecture 2
- Lecture Halls
- Java3D Lecture
- codeforce499B - Lecture
- B. Lecture
- Lecture 1
- Lecture 3
- Lecture 3
- Lecture 4
- Lecture 5
- PHP指定概率算法
- 2017 多校训练第一场 HDU 6044 Limited Permutation
- JAVA单例模式
- <划重点的Unity2017> UGUI
- ThinkPHP 的页面静态化功能的实现(三)
- Lecture 16
- ThinkPHP 的页面静态化功能的实现(二)
- java 搭建基于springboot的ssh(spring + springmvc + hibernate)的gradle项目(添加多Module篇)
- 有史以来程序员最实用快捷键
- 1064. Complete Binary Search Tree 解析
- 牛客网编程基础6-8
- caffe之SSD算法词袋解析
- ThinkPHP 的页面静态化功能的实现(一)
- Informatica的下载安装和配置