JessieMCQ40

Run Settings
LanguageJava
Language Version
Run Command
import java.util.*; public class Main { public static void main(String[] args) { // Jessie Zeng // AP CS A // MCQ 40 List<String> students = new ArrayList<String>(); students.add("Alex"); students.add("Bob"); students.add("Carl"); for (int k = 0; k < students.size(); k++) { System.out.print(students.set(k, "Alex") + " "); } System.out.println(); for (String str : students) { System.out.print(str + " "); } // Output: // Alex Bob Carl // Alex Alex Alex } }
Editor Settings
Theme
Key bindings
Full width
Lines