1. What is the output of the following pseudo-code?
String[] languages = {“Telugu”, “Tamil”, “Sanskrit”, “English”};
languages[4] = “Japanese”;
System.out.println(languages[0]);
Ans. Array Index Out of Bounds exception.
2. What is the syntax for initializing an array in Java?
Ans. type[] array Name = new type[size];
3. How do you access a specific element in a one-dimensional array in Java?
Ans. array[index];
4. What is the default value of an integer array element in Java?
Ans. 0.
