1️⃣
for (String 2️⃣ : passwords) {
System.out.println(currPassword);
}
What needs to go into 1️⃣ and 2️⃣for this code to compile?
RECALL
Here is some code:
String result = "";
for (String currLetter : letters) {
result += currLetter;
}
System.out.println(result);
Assume the ArrayList<String> letterscontains these strings:
"1"
"2"
"3"
What will appear in the console when the code is run?
RECALL
Here is some code:
Scanner numScanner = new Scanner("124 200");
int num = numScanner.nextInt();
while (num % 100 != 0) {
System.out.println("ping!");
}
System.out.println("Done!");