Loading…
Loading…
Language
Articles and problems tagged Java.
The OCP Java 21 basics: what the JDK, javac, java and the JVM do, how a class and a source file are structured, the three comment styles, every legal form of main(), command-line arguments, single-file launching and Java 25's compact source files.
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.
Everything to know before you study for the Oracle Certified Professional Java SE 21 Developer exam (1Z0-830): format, objectives, the unwritten assumptions, question styles, pacing, the new Java 25 exam, and how to use this course and its quizzes.
Full table of contents for the OCP Java 21 course: 93 articles across sixteen chapters, each with a verified practice quiz, plus a pre-study diagnostic, chapter reviews and three mock exams. The reading order for the Oracle 1Z0-830 exam and its Java 25 successor (1Z0-831).
Advanced FFM calls: passing Java code to C as function pointers with upcall stubs, binding objects and lambdas, calling variadic functions such as printf, capturing errno and GetLastError, and a C library that calls back into Java. The final article of the course.
Calling C functions from pure Java with the FFM API: the native linker, default, library and loader symbol lookups, function descriptors, downcall handles, invokeExact, pointers and NULL, struct results, critical calls, enabling native access, and generating bindings with jextract.
Describing C data with FFM memory layouts: value layouts and C types, struct and union layouts, alignment and padding, sequences, layout paths, var handles with base offsets, offset and slice handles, pointers with target layouts, and atomic access modes.
Getting started with the FFM API (final since Java 22): a first foreign call, confined, shared, automatic and global arenas, native and heap memory segments, reading and writing values, C strings and arrays, alignment and byte order, slices, copies, allocators, and memory-mapped files.
The Java Native Interface: declaring native methods, generating headers with javac -h, JNI function naming and type mapping, strings and modified UTF-8, arrays, calling Java from C, exceptions, references, building and loading libraries, native access restrictions, and why the FFM API replaces JNI.
Printing from Java: Printable and PrinterJob, print and page setup dialogs, PageFormat and Paper in points, banding and clipping, multipage output with Book and Pageable, print preview, javax.print services and document flavors, PostScript stream services, and printing attributes.
Pixel images: reading and writing PNG, JPEG, GIF, BMP and TIFF with ImageIO, readers, writers, multi-image files and JPEG quality, the anatomy of BufferedImage with rasters and color models, pixel access, and filtering with convolution, lookup, rescale, color conversion and affine transforms.
The Graphics2D pipeline settings in depth: BasicStroke widths, caps, joins, miter limits and dashes; color, gradient and texture paints; affine transforms and their order; clipping with shapes and text outlines; and alpha compositing with the twelve Porter-Duff rules.
How Graphics2D renders: the stroke, transform, clip, fill and compose pipeline, rendering hints, the Shape hierarchy with Float and Double classes, rectangles, ellipses, arcs, curves, Path2D with winding rules, and combining shapes with Area.
Showing hierarchical data with JTree: DefaultMutableTreeNode and DefaultTreeModel, root handles and forests, tree paths and rows, editing through the model, node enumerations, selection events, cell renderers, and writing a lazy custom TreeModel.
How JTable draws and edits its cells: default renderers by column class, custom renderers as rubber stamps, header renderers, the default text, check box and combo box editors, validating input, and writing your own cell editor with AbstractCellEditor.
Displaying tabular data with JTable: simple tables, custom AbstractTableModel classes and their events, column classes, the column model, resizing, selection, view versus model indexes, and sorting and filtering rows with TableRowSorter and RowFilter.
Asking the user for input in Swing: ready-made JOptionPane message, confirm, option and input dialogs; custom JDialog classes with modality types, default buttons and data exchange; and file selection with JFileChooser, filters, views and accessories.
Laying out real forms in Swing: GridBagLayout cells, spans, weights, fill, anchor and padding, a helper class that tames the constraints, BoxLayout with glue and struts, and writing your own LayoutManager.
Building menu bars, submenus, check box and radio menu items and pop-up menus in Swing; keyboard mnemonics and platform-correct accelerators; enabling items at the right moment; and toolbars and tooltips that share Action objects with the menus.
Letting users choose instead of type: check boxes, radio buttons in button groups, borders and titled panels, generic combo boxes and their models, sliders with ticks and labels, plus spinners and lists.