Array
Less than 1 minuteNoteLanguageJava
- Initialisation
<type>[] varArr = new <type>[size];- All elements will be initialized to
0,false, ornull
- All elements will be initialized to
<type>[] varArr = {element1, element2, };- Must combine with the declaration
- For loop
- Array is an object
- Array has a field
length - Array utilities -
Arraysint binarySearch()int compare()T[] copyOf()boolean equals()void fill()void sort()String toString()List<T> asList()
