Vidyalelo
Data Structure · Q128

Introduction to Data Structures

Programming · Data Structure · question 128

Q128

What is the output of the following Java code? public class array public static void main(String args[]) int []arr = 1,2,3,4,5; System.out.println(arr[5]);

A.
4
B.
5
C.
ArrayIndexOutOfBoundsException
Answer
D.
InavlidInputException

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board