Week1Mock1MCQ22

Run Settings
LanguageJava
Language Version
Run Command
public class Main { public static void main(String[] args) { // Harbor, Week 1, Mock 1, PR_PracticeTest_1.pdf // AP CS A // MCQ 22 int[] arr1 = {1, 2, 3, 4, 5, 6}; int[] arr2 = arr1; int last = arr1.length - 1; for (int i = 0; i < arr1.length; i++) arr2[i] = arr1[last - i]; for (int i = 0; i < arr1.length; i++) System.out.print(arr1[i] + " "); System.out.println(" "); for (int i = 0; i < arr2.length; i++) System.out.print(arr2[i] + " "); } }
Editor Settings
Theme
Key bindings
Full width
Lines