Single Choice
Not Set
QWhat will be the output?
public class Test{
public static void main(String[] args){
int[] a = new int[4];
a[1] = 1;
a = new int[2];
System.out.println("a[1] is " + a[1]);
}
}
ID: #2204
Array in Java
1,448 views
Question Info
#2204Q ID
Not SetDifficulty
Array in JavaTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
a[1] is 0
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic