Unit 4 · Data Collections
Array Basics
Array Basics MCQ Practice
Question 1 of 15
Answered 0 of 15
Choose one answer.
What is printed by the following code segment?
public class ArrayBasicsContext
{
public static void runExample()
{
int[] a = new int[4];
a[2] = 7;
System.out.print(a.length + " " + a[0] + " " + a[2]);
}
public static void main(String[] args)
{
runExample();
}
}