Working with Arrays and Collections
5 practice questions under this official exam objective (1Z0-829) — each with the community-verified answer, a full option-by-option explanation and instant feedback.
Java var ArrayList Reassignment Compilation in 1Z0-819
This 1Z0-819 question tests local variable type inference with generic collections: `var listA = new ArrayList()` and `var listC = new ArrayList()` co
What Happens When You Sort a List Created with List.of()?
This 1Z0-819 fragment builds a flower list with List.of() and then attempts to sort it with a Comparator, so the exam tests whether you recognize that
Which return statements compile for a generic House method?
This 1Z0-819 generics question supplies the hierarchy Animal → Dog → Petdog and asks which two return statements make the method compile when its decl
Which Stream Method Finds an Item With count Below Zero?
This 1Z0-819 question asks which Stream pipeline correctly tests whether the items list contains at least one element whose count field is below zero.
Java Collections.binarySearch Unsorted List Behavior
This question examines the critical requirement that Lists must be sorted for Collections.binarySearch to work correctly, explaining why an unsorted l