print array java for loop code example
Example: print array java without loop
import java.util.*;
class MyArrays {
public static void main(String[] args)
{
// Get the array
int arr[]= { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
// Print the array
System.out.println("Array: "+ Arrays.toString(arr));
}
}