Computer Applications
What is an array? Write a statement to declare an integer array of 10 elements.
Java Arrays
ICSE 2012
10 Likes
Answer
An array is a structure to store a number of values of the same data type in contiguous memory locations. The following statement declares an integer array of 10 elements:
int arr[] = new int[10];
Answered By
5 Likes
Related Questions
Name the below structure:

- One dimensional array
- Two Dimensional array with 4 rows and 5 columns
- Three dimensional array
- Two Dimensional array with 5 rows and 4 columns
The statement used to find the total number of Strings present in the string array String s[] is:
- s.length
- s.length()
- length(s)
- len(s)
Consider the following two-dimensional array and answer the questions given below:
int x[ ][ ] = {{4,3,2}, {7,8,2}, {8, 3,10}, {1, 2, 9}};(a) What is the order of the array?
(b) What is the value of x[0][0]+x[2][2]?