4 What is printed by the following segment of Java code int
 4.      What is printed by the following segment of Java code?         int[] A = {3, 4, 1, 2};         int T = 2;         A[T - 1]--;         A[T] = A[T + 1] - 1;         T = A[T];         A[T - 1] += 1;         A[T + 2] = 2 * A[T + 2] - 1;         System.out.println(A[0] + \" \" + A[1] + \" \" + A[2] + \" \" +     A[3] + \" \" + T);  Solution
output:
4 3 1 3 1
explanation:
![4. What is printed by the following segment of Java code? int[] A = {3, 4, 1, 2}; int T = 2; A[T - 1]--; A[T] = A[T + 1] - 1; T = A[T]; A[T - 1] += 1; A[T + 2]  4. What is printed by the following segment of Java code? int[] A = {3, 4, 1, 2}; int T = 2; A[T - 1]--; A[T] = A[T + 1] - 1; T = A[T]; A[T - 1] += 1; A[T + 2]](/WebImages/27/4-what-is-printed-by-the-following-segment-of-java-code-int-1073218-1761562497-0.webp)
