What is the output of the following piece of code?public class array { public static void main(String args[]) { int []arr = {1,2,3,4,5}; System.out.println(arr[2]); System.out.println(arr[4]); } }
Download the Study24x7 App, so you can connect and collaborate.