Skip to content
UPEEC

Arrays in Java

Fixed-size, typed, zero-indexed objects with a `length` field and bounds checking.

Beginner
Comments 0

int[] a = new int[5]; int[][] grid = new int[3][4]; Arrays.sort(a), Arrays.toString(a), Arrays.fill(a, -1).

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.