writ the java statment to declare an array ti store the $,6,+,d,@
Answers
Answered by
1
Answer:
Explanation:
Here's a simple program, called ArrayDemo (in a .java source file), that creates the array, puts some values in it, and displays the values.
public class ArrayDemo {
public static void main(String[] args) {
int[] anArray; // declare an array of integers
anArray = new int[10]; // create an array of integers
// assign a value to each array element and print
for (int i = 0; i < anArray.length; i++) {
anArray[i] = i;
System.out.print(anArray[i] + " ");
}
System.out.println();
Similar questions