The correct answer is A because when i = 4, arr[4] does not exist, causes the ArrayIndexOutOfBoundsException. I tested on eclipse and return this answer.
Answer is A.
Notice that the loop iterates over the size of the array + 1, throwing an exception. It will print the 4 elements of the array and the exception (ArrayIndexOutOfBoundsException).
Answer: A
It prints 1 2 3 4 and then when we try to access arr[arr.lenghth+1] causes the ArrayIndexOutOfBoundsException.
upvoted 2 times
...
This section is not available anymore. Please use the main Exam Page.1z0-808 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
iSnover
Highly Voted 2 years, 9 months agoreenarani04325
Most Recent 10 months agoPriyamed
10 months, 1 week agoOmar_Deeb
1 year, 10 months agoSreeni_A
1 year, 10 months agoKolodets
2 years, 2 months agoVicky_65
2 years, 2 months agoodzio33
2 years, 5 months agoGauravlti
2 years, 6 months agoakbiyik
2 years, 7 months agocarloswork
2 years, 8 months agokkaayyyy
2 years, 8 months agoRoxyFoxy
2 years, 9 months agoJoker74
2 years, 9 months ago