Oracle · 1Z0-829
Validates expertise in Java SE 17 programming, covering core language features, object-oriented design, functional programming with streams and lambdas, concurrency, JDBC, and the Java Platform Module System. Targets experienced Java developers seeking professional-level certification.
Practice Questions
598
≈ 9 practice exams
Duration
90 minutes
Passing Score
68%
Difficulty
ProfessionalLast Updated
Aug 2026
Use this 1Z0-829 practice exam to prepare for Oracle Certified Professional: Java SE 17 Developer (1Z0-829) with realistic questions, detailed explanations, and focused study modes. The practice bank includes 598 questions for Oracle 1Z0-829, so you can review the exam steadily instead of relying on one long cram session.
As you practice, pay extra attention to recurring topics such as Handling Date, Time, Text, Numeric and Boolean Values, Controlling Program Flow, Utilizing Java Object-Oriented Approach, Handling Exceptions, and Working with Arrays and Collections. Start with short sessions to identify weak areas, then move into timed quizzes once your accuracy is consistent.
The explanations are written for candidates preparing for Oracle certification questions and reviewing how the concepts apply in practice. Use the free preview first, then unlock the full question bank when you are ready to build a complete study routine.
5 sample questions with answers and explanations. The full bank has 598 questions, enough for 9 full-length practice exams.
Preview — answers shown1. A developer at Contoso evaluates the following two expressions: System.out.println(1 + 2 + "3"); System.out.println("1" + 2 + 3); What is printed? (Select one!)
Explanation
The + operator is evaluated strictly left to right and switches behavior when it encounters a String operand. In the first statement, 1 + 2 is processed first as integer addition producing the int 3, then 3 + "3" triggers string concatenation to produce "33". In the second statement, "1" + 2 triggers string concatenation immediately because the left operand is already a String, producing "12", then "12" + 3 concatenates to produce "123". Once a String operand appears on the left, all subsequent + operators in that left-to-right chain become concatenation rather than addition.
2. A developer at Northwind writes the following code: public class BoxingTest { public static void main(String[] args) { Integer a = 100; Integer b = 100; Integer c = 200; Integer d = 200; System.out.println((a == b) + " " + (c == d)); } } What is the output? (Select one!)
Explanation
Java caches Integer instances for values in the range -128 to 127 inclusive. When Integer a = 100 and Integer b = 100 are assigned, both variables point to the same cached object, so the == operator compares the same reference and returns true. Integer c = 200 and Integer d = 200 fall outside the cache range, so the JVM creates two separate Integer objects. The == operator compares references, not values, so c == d returns false. The output is therefore true false. To compare integer values reliably regardless of range, equals() should be used instead of ==. This caching behavior is an implementation detail guaranteed by the Java Language Specification only for the range -128 to 127.
3. A developer at Northwind writes the following code: int[] data = {10, 20, 30, 40, 50}; System.out.println(Arrays.binarySearch(data, 25)); System.out.println(Arrays.binarySearch(data, 10)); What is the output? (Select one!)
Explanation
Arrays.binarySearch() requires the array to already be sorted in ascending order. When the target element is present, the method returns its index. When the element is absent, it returns -(insertion point) - 1, where the insertion point is the index at which the value would need to be inserted to maintain sorted order. For the value 25, it falls between 20 at index 1 and 30 at index 2, so the insertion point is 2 and the return value is -(2) - 1 = -3. For the value 10, it is present at index 0 and the method returns 0 directly. The negative result formula ensures that not-found results are always negative, allowing callers to distinguish a not-found response from a valid zero-based index. Searching an unsorted array produces undefined behavior.
4. A developer at Fabrikam writes the following code to build descriptive output strings: int width = 5; int height = 3; String result1 = width + height + " sq units"; String result2 = "Area: " + width + height; System.out.println(result1); System.out.println(result2); What is printed? (Select one!)
Explanation
Java's + operator evaluates left-to-right. In `width + height + " sq units"`, both width and height are int at the first + so arithmetic is performed: 5 + 3 = 8. Then 8 is concatenated with " sq units" to produce "8 sq units". In `"Area: " + width + height`, the first operand is already a String, so "Area: " + 5 produces "Area: 5", and then "Area: 5" + 3 produces "Area: 53". The critical rule is that String concatenation does not trigger for numeric + numeric; arithmetic is performed until at least one operand in a given + sub-expression is a String. Parentheses can force different grouping: `"Area: " + (width + height)` would produce "Area: 8".
5. A developer at Adatum defines the following two overloaded methods in a utility class: public void process(double d) { System.out.println("double"); } public void process(Integer i) { System.out.println("Integer"); } The following call is then made: process(5); What output is produced? (Select one!)
Explanation
Java resolves overloaded methods in three sequential phases. Phase one attempts to match using only widening primitive or reference conversions (no boxing). Phase two allows autoboxing and unboxing. Phase three additionally allows varargs. The literal 5 is of type int. No exact match exists because neither method accepts int. In phase one, int widens to double, making process(double d) a valid candidate. Phase two would allow boxing int to Integer to match process(Integer i), but the compiler only advances to phase two if phase one produced no candidates. Because phase one already resolves the call via widening, process(double d) is selected and the output is double. Overload resolution is entirely a compile-time decision; no RuntimeException is involved.
$17.99
One-time access to this exam