CSSE 220
Arrays, ArrayLists, Wrapper Classes, Auto-boxing, Enhanced for loop
Import ArraysListPractice from Git clone
1
CSSE 220 Arrays, ArrayLists, Wrapper Classes, Auto-boxing, Enhanced - - PowerPoint PPT Presentation
CSSE 220 Arrays, ArrayLists, Wrapper Classes, Auto-boxing, Enhanced for loop Please sit in the first four rows! (not the back row if possible ) Import ArraysListPractice from Git clone 1 Speed With Which Things Move Moving up a level in
1
2
3
5
6
7
8
9
10
11
String s = “computer”; s.substring(0,3);
12
13
14
15
16
This does NOT construct any Dogs. It just allocates space for referring to Dogs (all the Dogs start out as null )
17
18
19
20
21
22
Element type Variable type Adds new element to end
Constructs new, empty list
Optional in Java 7 and
e.g., new ArrayList<>()
23
24
25
Primitive Wrapper byte Byte boolean Boolean char Character double Double float Float int Integer long Long short Short
26
27
28
No index variable (easy, but limited in 2 respects) Gives a name (score here) to each element
29
30
31