Слайд 2Agenda
02
03
04
Arrays Initializers and Anonymous Arrays
“for each” loop
Array Copying
Array Sorting
01
05
Multidimensional Array
06
Ragged Array

Слайд 3Array copying
02
int[] smallPrimes = {2, 3, 5, 7} ;
new int[] {17, 19,
![Array copying 02 int[] smallPrimes = {2, 3, 5, 7} ; new](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/988223/slide-2.jpg)
Слайд 4“for each” loop
for (variable : collection) statement
for(int el : smallPrimes) System.out.println(el);

Слайд 5Array Copying
int[] luckyNumbers = smallPrimes ;
luckyNumbers[3] = 12;
int [] copiedValues = Arrays.copyOf(luckyNumbers,
![Array Copying int[] luckyNumbers = smallPrimes ; luckyNumbers[3] = 12; int [] copiedValues = Arrays.copyOf(luckyNumbers, luckyNumbers.length);](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/988223/slide-4.jpg)
luckyNumbers.length);
Слайд 6Array Sorting
Arrays.sort(a);

Слайд 7Multidimensional Array
int [][] matrix = new int[2][3];
int [][] matrixInitialized = {{1,2}, {3,4},
![Multidimensional Array int [][] matrix = new int[2][3]; int [][] matrixInitialized = {{1,2}, {3,4}, {5,6}};](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/988223/slide-6.jpg)
{5,6}};
Слайд 8Ragged Array
Arrays in which different arrays have different length
1
1 1
1 2 1
1

3 3 1
1 4 6 4 1
Слайд 9Materials
https://www.hackerrank.com/lesson-5
Homework
Chapter 3.10 - 3.10.7 inclusive
Reading
