Collections
Iterating an ArrayList
Predict exactly what the console prints after the loop runs.
Training
Read the snippet, think through the mutations and branches, then write what Java would print line by line.
Advertisement
Challenges
Collections
Predict exactly what the console prints after the loop runs.
Maps
Fill in the two lines that this LinkedHashMap iteration will print.
Strings
Type the exact line printed, including spaces and capitalization.
Control Flow
What single number reaches System.out.println at the end?
Streams
Write the exact string printed when this stream pipeline executes.
Optional
Predict the two lines printed when working with Optional.filter + orElseGet.
Collections
Determine the three lines printed after mixing add, push, and poll operations.
Maps
Observe how Map.merge mutates entries; type the two numbers printed.