Week1Mock1APCSAMCQ4

Run Settings
LanguageJava
Language Version
Run Command
class Main { public static void swap(String a1, String a2) { String hold = a1; a1 = a2; a2 = hold; } public static void main(String[] args) { // Harbor, Week 1, Mock 1, PR_PracticeTest_1.pdf // AP CS A // Page _____ String animal1 = "elephant"; String animal2 = "lion"; swap(animal1, animal2); animal1.toUpperCase(); animal2.toLowerCase(); System.out.println(animal1 + " " + animal2); // Output: elephant lion } }
Editor Settings
Theme
Key bindings
Full width
Lines