Review break and continue while if break while

Review: break and continue . . while (…) {. . . if (…) break; . . . } while (…) {. . . if (…) continue; . . . } . . .

Probability Machine

Arrays § array: A variable that stores many values of the same type. index 0 1 2 3 4 5 6 7 8 9 value 12 49 -2 26 5 17 -6 84 72 3 element 0 element 4 element 9 § element: One value in an array. § index: A 0 -based integer used to access an element from an array.
![Declaring an array: int[] numbers = new int[10]; index 0 1 2 3 Declaring an array: int[] numbers = new int[10]; index 0 1 2 3](http://slidetodoc.com/presentation_image_h2/5ac5797f559e4dbb9e382776394c4903/image-4.jpg)
Declaring an array: int[] numbers = new int[10]; index 0 1 2 3 4 5 6 7 8 9 value 0 0 0 0 0 General Syntax: type[] name = new type[size]; The array's length can be any expression. int len = scnr. next. Int(); int[] data = new int[len];

Array auto-initialization When arrays are initially constructed, every element is automatically initialized to the "zero" value for that type. int: 0 double: 0. 0 boolean: false char: '