Loading…
Loading…
Short multiple-choice checks on what you have read. Sign in to take them and keep your best score.
Ten exam-style questions on the parts of a Java method declaration: access modifiers, the order of specifiers, return types and return statements, legal method names, parameter lists, method signatures, throws clauses and bodies, with explanations.
A 20-question mixed review of OCP Java 21 Chapter 4: string concatenation and methods, StringBuilder, equality and the string pool, arrays, Arrays utilities, Math and BigDecimal, the java.time types, Period, Duration, Instant and daylight saving time.
Ten exam-style questions on creating and printing Period and Duration, chained static factories, which types accept which amount, ChronoUnit.between truncation, truncatedTo, Instant conversion and US daylight saving time gaps and overlaps, with explanations.
Ten exam-style questions on choosing and creating java.time types, of() overloads, DateTimeException, immutability, end-of-month clamping, which plus methods exist on which type, with and at methods, toString formats and time zone offsets, with explanations.
Ten exam-style questions on Math.min/max overloads, round/ceil/floor return types and negative values, pow and random, Java 21 clamp, exact arithmetic, and BigInteger and BigDecimal creation, immutability, division and equality, with explanations.
Ten exam-style questions on Arrays.equals, Arrays.compare ordering rules, Arrays.mismatch, varargs parameters, multidimensional declarations, jagged arrays, nested loops, deepToString and deepEquals, with explanations.
Ten exam-style questions on array declarations and initializers, default values, length and bounds, covariance and ArrayStoreException, Arrays.sort ordering, binarySearch results, fill and copyOf, with explanations.
Ten exam-style questions on == versus equals, string literals and the string pool, compile-time constants and final variables, runtime concatenation, new String, intern(), and equality for StringBuilder, arrays and records, with explanations.
Ten exam-style questions on StringBuilder mutability and chaining, counting objects, constructors, append, insert, delete, replace, reverse, setLength, index exceptions and equality, with explanations.
Ten exam-style questions on charAt and substring boundaries, indexOf including the Java 21 ranged overloads, compareTo, replace, strip versus trim, indent and stripIndent, isBlank, format specifiers and method chaining, with explanations.
Ten exam-style questions on creating strings, the left-to-right rules of + for addition and concatenation, char arithmetic, null in concatenation, += on strings and String immutability, with explanations.
A 20-question mixed review of OCP Java 21 Chapter 3: if/else and pattern matching with flow scoping, switch statements and expressions, pattern switches with guards and null, record patterns, loops, break, continue, labels and unreachable code.
Ten exam-style questions on labeled and unlabeled break and continue in nested loops, break and continue inside switch, return from loops, unreachable statements and missing returns, with explanations.
Ten exam-style questions on while and do/while, for loop headers with several variables, loop variable scope, reverse loops, for-each sources and types, nested loops and constant loop conditions, with explanations.
Ten exam-style questions on type patterns in switch, when guards, dominance and branch order, exhaustive pattern switches, case null, sealed types and record patterns, with explanations.
Ten exam-style questions on switch selector types, compile-time constant case values, fall-through and break, arrow labels, switch expression semicolons, yield, result types and exhaustiveness, with explanations.
Ten exam-style questions on if/else chains, braces versus indentation, the dangling else, pattern matching with instanceof, pattern variable rules, supported pattern types and flow scoping, with explanations.
A 20-question mixed review of OCP Java 21 Chapter 2: precedence and evaluation order, increment and decrement, numeric promotion, casting and overflow, compound assignment, equality, instanceof, short-circuit logic and the ternary operator.
Ten exam-style questions on == with primitives and references, relational operators, instanceof, logical and bitwise & | ^, short-circuit && and || with side effects, and the ternary operator's evaluation and type, with explanations.
Ten exam-style questions on integer division and remainder, numeric promotion, widening and narrowing casts, overflow, constant expressions, compound assignment and the value of an assignment, with explanations.
Ten exam-style questions on operator kinds, precedence and associativity, left-to-right operand evaluation, the logical and bitwise complement, negation, and prefix and postfix increment and decrement, with explanations.
A 20-question mixed review of OCP Java 21 Chapter 1: the main method, source files, packages and imports, class path commands, constructors and initialization order, literals, wrappers, text blocks, var, scope and garbage collection.
Ten exam-style questions on the scope of local variables, parameters, loop variables and fields, redeclaring names in nested blocks, garbage-collection eligibility, cycles, System.gc() and finalize(), with explanations.
Ten exam-style questions on legal identifiers, declaring several variables in one statement, definite assignment of local variables, default values for fields, final variables and every rule of var, with explanations.
Ten exam-style questions on Java's primitive types and ranges, numeric literals in different bases, underscore rules, primitives versus references, wrapper classes and their parse and valueOf methods, and text blocks, with explanations.
Ten exam-style questions on creating objects: constructors versus look-alike methods, the default constructor, field defaults, instance initializer blocks, forward references, chained constructors and the order of initialization, with explanations.
Ten exam-style questions on packages, wildcard and single-type imports, java.lang, Date naming conflicts, javac -d, the class path options, JAR files and the order of elements in a source file, with explanations.
Ten exam-style questions on the JDK tools, bytecode, comments, classes and source files, legal main() declarations, command-line arguments and single-file launching, with explanations.
A 31-question diagnostic covering every 1Z0-830 exam area, from operators and switch to modules, concurrency and I/O. Take it before you start studying to find out which chapters need the most attention.