Loading
Data-structure-with-JAva-Tutorial

Traversing

Traversing is the operation through which we can access each element of the array one by one.


Program Solution:

package QuipoHouse.ArrayOperations;

public class Traversing {

	public static void main(String[] args) {

		int arr[] = { 1, 25, 15, 16, 18, 19, 147 };

		for (int i = 0; i < arr.length; i++) {
			System.out.print(arr[i] + " ");
		}

	}

}

Output:

1 25 15 16 18 19 147