Loading…
Loading…
Topic
Articles and problems tagged Packaging and Documentation.
The four Java access levels for the OCP 21 exam: private, package (no keyword), protected and public, with the full access table, why protected through a superclass reference fails in another package, protected constructors and static members, and how modules affect public.
How Java packages and imports work for the OCP 21 exam: wildcards, java.lang, redundant imports, Date naming conflicts, fully qualified names, javac -d, the three class path options, JAR files, element order in a file and Java 25 module imports.
Solving the authentication problem with X.509 certificates: what a certificate contains, certificate authorities and chains of trust, keytool and PKCS #12 key stores, PKIX path validation in code, and signing and verifying JAR files with jarsigner and the JarSigner API.
Write professional Java API documentation with javadoc: /** */ comments for classes, methods, fields and packages, @param, @return, @throws, @see and {@link}, {@code} and HTML, code snippets (Java 18), Markdown doc comments (Java 23), and generating HTML with the javadoc tool.
Package Java applications and libraries as JAR files: the jar tool and its options, the META-INF/MANIFEST.MF manifest, executable JARs with Main-Class and java -jar, multi-release JARs, modern --long options, JDK_JAVA_OPTIONS, fat JARs and jpackage installers.
Understand Java's default package access and why forgetting private breaks encapsulation, then master the class path: how the JVM and javac locate classes in directories and JAR files, -cp and --class-path, wildcards, the CLASSPATH variable, and fixing ClassNotFoundException.
How Java packages organize classes and prevent name clashes: reverse-domain package names, fully qualified names, single-type and on-demand imports, resolving conflicts like java.util.Date vs java.sql.Date, static imports, module imports in Java 25, and placing classes into packages and directories.
Package Java modules as modular JARs with jar, --module-version and a main class, then learn why deep reflection fails across modules and fix it with opens, open modules, resource access rules and MethodHandles.Lookup.
Declare Java module dependencies with requires and publish packages with exports: the "package is not visible" error, the module graph and readability, why requires is not transitive, hiding implementation packages, compiling and running multi-module apps, and split packages.
A line-by-line explanation of a simple Java program: classes and naming rules, why the file name matters, what public static void main(String[] args) means, statements and method calls, print vs println, exit codes, comments, and Java 25's simpler main.