public class One { public One() { a = new int[NUM]; } public int get(int i) { return a[i]; } private int[] a; public static final int NUM = 3; } public class Two { public Two() { b = new int[NUM]; b[0] = 2; } public int get(int i) { return b[i]; } private int[] b; public static void main(String[] args) { One o1 = new One(); Two o2 = new Two(); System.out.println(o1.get(0)); System.out.println(o2.get(0)); } }
Select the most appropriate answer.