Professional Documents
Culture Documents
Robust - English meaning of Robust is Comments - for reader not for the
Strong compile
break statement is typically used for two Java file I/O is a four-step process:
purposes: 1. Import classes from java.util
● To exit early from a loop and java.io packages
● To skip the remainder of the 2. Create objects and associate
switch structure them with input/output sources
3. Use appropriate methods to ● The index specifies the position
input/output the data of the element in the array.
4. Close the files. ● In Java, array indices start at 0,
Use PrintWriter to send output to and the [] operator is used for
a file array subscripting.
B. Disadvantages of arrays:
● Limited size, cannot grow at
runtime
● Collection framework is used to
solve this problem
C. Types of arrays:
● Single-dimensional array
● Multidimensional array
D. Examples
The statement:
int[] num = new int[5];