You have an ArrayList called idList that adds a unique user id whenever someone signs up for your website.
Which of these choices will print all of the indexes and the unique user id with a space in between them starting at the first index?
for (int i = 1; i < idList.size(); i++) {
System.out.println(i - 1 + " " + idList.get(i));
}
B and C
for (String uuid : idList) {
System.out.println(uuid);
}
for (int i = 0; i < idList.size() - 1; i++) {
System.out.println(i + " " + idList[i]);
}
for (int i = 0; i < idList.size(); i++) {
System.out.println(i + " " + idList.get(i));
}
unanswered
Answers
Answered by
0
Answer:
Explanation:
for (int i = 0; i < idList.size() - 1; i++) {
System.out.println(i + " " + idList[i]);
}
Similar questions