Given a one-dimensional array arr, what is the correct way of getting the number of elements in arr?
Answer options
A
arr.length()
B
arr.length()-1
C
arr.length
D
arr.length-1
Correct answer: arr.length()
Explanation
Correct answer: arr.length().
Correct answer: arr.length()
Correct answer: arr.length().
PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.