Loading…
Loading…
Language
Articles and problems tagged Java.
The third full 50-question mock exam for the OCP Java SE 21 Developer exam (1Z0-830), weighted toward the hardest areas: streams, concurrency, generics, modules and I/O. 120 minutes, 68% to pass, with explanations.
The second full 50-question mock exam for the OCP Java SE 21 Developer exam (1Z0-830): new questions on every objective, with more multi-select. 120 minutes, 68% to pass, with an explanation for every answer.
A full 50-question mock exam for the OCP Java SE 21 Developer exam (1Z0-830), covering every objective at exam difficulty. 120 minutes, 68% to pass, with an explanation for every answer.
Ten exam-style questions mixing the most-tested OCP Java 21 rules from the final checklist: promotion, String immutability, overloading, initialization order, collections, streams, exceptions and switch patterns, with explanations.
Ten exam-style questions on the Java 22 to 25 features tested by 1Z0-831: unnamed variables and patterns, flexible constructor bodies, module imports, compact source files and instance main, stream gatherers and scoped values, with explanations.
A 20-question mixed review of OCP Java 21 Chapter 14: File and Path, normalize, resolve and relativize, Files copy, move and delete, byte and character streams, reading and writing files, serialization, the console, mark and reset, attributes, walk and find.
Ten exam-style questions on advanced Java I/O: mark, reset and skip, isHidden and other access checks, BasicFileAttributes and views, Files.walk depth and symbolic links, Files.find and DirectoryStream, with explanations.
Ten exam-style questions on user interaction in Java: System.out versus System.err, reading System.in with BufferedReader, closing system streams, System.console() and null, readLine, readPassword and printf versus format, with explanations.
Ten exam-style questions on Java serialization: Serializable, transient and static fields, constructors and initializers on deserialization, non-serializable parents, records, serialVersionUID, EOFException and checked exceptions, with explanations.
Ten exam-style questions on reading and writing files: read loops and -1, buffers and read counts, readLine and null, append mode, PrintWriter, Files.readString, readAllLines versus lines, newBufferedReader and open options, with explanations.
Ten exam-style questions on java.io stream fundamentals: byte versus character streams, charsets, input versus output, low-level versus high-level streams, legal wrapping, the abstract base classes, PrintStream and PrintWriter, and read() returning -1, with explanations.
Ten exam-style questions on NIO.2 file operations: Files.copy for files, directories and streams, REPLACE_EXISTING, copying into directories, move and ATOMIC_MOVE, delete versus deleteIfExists, isSameFile and mismatch, with explanations.
Ten exam-style questions on NIO.2 Path methods: immutability, getNameCount, getName and subpath, getParent and getRoot, resolve, relativize, normalize, toRealPath, startsWith, option enums and creating directories, with explanations.
Ten exam-style questions on referring to files: absolute and relative paths, path symbols, creating File and Path objects, Path.of versus Paths.get, URIs, converting between File and Path, and matching File methods to Path and Files methods, with explanations.
A 20-question mixed review of OCP Java 21 Chapter 13: platform and virtual threads, thread states, executors, Callable and Future, scheduling, atomic classes, volatile, synchronized, ReentrantLock, CyclicBarrier, concurrent collections, liveness problems and parallel streams.
Ten exam-style questions on parallel streams: creating them, forEach versus forEachOrdered, findAny versus findFirst, reduce identity and associativity, three-argument collect, concurrent collectors and stateful lambdas, with explanations.
Ten exam-style questions on concurrent collections and threading problems: ConcurrentModificationException, ConcurrentHashMap, CopyOnWriteArrayList, skip-list classes, blocking queues, synchronized wrappers, deadlock, starvation, livelock and race conditions, with explanations.
Ten exam-style questions on the Lock framework and coordination tools: ReentrantLock, lock and unlock, tryLock with and without a timeout, hold counts, IllegalMonitorStateException, ReentrantReadWriteLock and CyclicBarrier, with explanations.
Ten exam-style questions on thread safety: race conditions and lost updates, volatile, AtomicInteger methods, compareAndSet, synchronized blocks and methods, which object is locked, and the BLOCKED state, with explanations.
Ten exam-style questions on the Concurrency API: Executors factory methods, execute versus submit, Callable versus Runnable lambdas, Future.get and ExecutionException, invokeAll and invokeAny, shutdown and close, and scheduling, with explanations.