Consider an array A.
(i) Write the code to find the size of the array in Java.
(II) If the size of array is 5,whats will be displayed for this line of code? -System.out.println(A[5]);
Answers
Answered by
0
Answer:
(i) With the help of the length variable, we can obtain the size of the array. Examples: int size = arr[]. length; // length can be used // for int[], double[], String[] // to know the length of the arrays.
Explanation:
I hope this is helpfull for you☺
Mark my answer Brainliest✌
Follow me☺
Nd Like my Answer✌
Similar questions