java

MY first web page!

WELCOME TO MY SITE...

hello guys


Wednesday, 1 May 2024

Java | print array values

Java | different ways to print array values

There are several ways to print the elements of an array in Java. Here are the most common ones:

        
            int[] array = {1, 2, 3, 4, 5};
			for (int i = 0; i < array.length; i++) {
    			System.out.println(array[i]);
			}