// This class shows an example array mystery problem. // The final will have a problem like this. import java.util.*; public class ArrayMystery { public static void main(String[] args){ mystery(); } public static void mystery() { int[] a = {1, 7, 5, 6, 4, 14, 11}; for (int i = 0; i < a.length - 1; i++) { if (a[i] > a[i + 1]) { a[i + 1] = a[i + 1] * 2; } } System.out.println("mystery array = " + Arrays.toString(a)); } }