Question #285870

What is the output of the following Java program?

import java.util.*;

class ArrayGames {

public static void main(String[] args) {

int[] a = {1,2,3,4,5};

System.out.println(a[1]);

}

}


Expert's answer

2


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS