Q:

Write a java program that declares an array of 10 integers and prints the array elements using a for loop statement

0

Exercise 1: Write a java program that declares an array of 10 integers and prints the array elements using a for loop statement. The array elements are as follows:

Int [] Arr1 = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

public class Main
{
	public static void main(String[] args) {
	    int []arr1={10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
	    for(int i=0;i<arr1.length;i++)
	    {
	       System.out.println(arr1[i]);    
	    }

	}
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now