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, 7 months agoreenarani04325
Most Recent 7 months, 3 weeks agoPriyamed
8 months, 1 week agoOmar_Deeb
1 year, 8 months agoSreeni_A
1 year, 8 months agoKolodets
2 years agoVicky_65
2 years agoodzio33
2 years, 3 months agoGauravlti
2 years, 4 months agoakbiyik
2 years, 4 months agocarloswork
2 years, 6 months agokkaayyyy
2 years, 6 months agoRoxyFoxy
2 years, 7 months agoJoker74
2 years, 7 months ago