Java NotesRohit’s interview study guide
Chapter 01

How Java Runs

What changed since Java 6, how source code becomes bytecode and runs on the JVM, the ways to run a program today, and how packages and the classpath compare with Node modules. Every example was run with Java 25 (Eclipse Temurin 25.0.5.1).

Try it yourself. Install a JDK first (Setting up Java on a new Mac). Then, for each example, make an empty folder, save every code box in it under the name in its caption (a caption like com/example/app/Main.java means a com/example/app folder), and type the $ lines of the Terminal box in that folder. Your output should match the page.

6 topics
Parts marked Advanced are extra depth. Skip them on a first read or a quick revision.

#What changed since Java 6

Added

If you last wrote Java around 2008, you wrote Java 6: anonymous inner classes for every callback, for loops over Iterators, getters and setters on every data class, new ArrayList<String>() with the type written twice, and XML for everything. That Java still compiles today. But the code you'll read in a 2026 codebase looks different, because the language has added more in the last ten years than in the ten before.

The biggest change is how Java ships. After Java 6 (2006) there was a five-year gap to Java 7 (2011) and three more to Java 8 (2014), the release that brought lambdas and streams. Since Java 9 (2017) there's a new version every six months (March and September), and every two years one of them is a long-term support (LTS) release that companies standardise on: 8, 11, 17, 21 and now 25 (September 2025). The mental model is Node.js: odd and even releases come and go, but production runs on the even-numbered LTS lines. In Java, the in-between releases (22, 23, 24, 26, 27) are where features arrive and settle, often as preview features first, which you must switch on with --enable-preview and which can still change.

The LTS versions are what interviewers and job postings mean by "Java 17" or "Java 21", so this table is worth knowing roughly by heart: what each one added that you'll actually meet in code.

LTSReleasedWhat you'll see in code
Java 8March 2014lambdas, method references, streams, Optional, default methods in interfaces, the java.time date API
Java 11September 2018var (Java 10), the HttpClient, java File.java without compiling, new String methods (isBlank, strip, lines, repeat), List.of (Java 9)
Java 17September 2021records, sealed classes, text blocks, switch expressions, pattern matching for instanceof, helpful NullPointerException messages
Java 21September 2023virtual threads, pattern matching in switch, record patterns, sequenced collections
Java 25September 2025compact source files and instance main methods, module imports, flexible constructor bodies, scoped values; virtual threads no longer pin on synchronized (Java 24)

The releases since 25 are Java 26 (March 2026) and Java 27 (September 2026), the newest today. Neither is LTS and neither made a language feature final, so for code and interviews Java 25 is the current target. The next LTS is planned for Java 29 in September 2027.

Here is the same small program written the way you'd have written it in 2008, and the way you'd write it now. Both are valid Java 25.

OldStyle.java
import java.util.*;

public class OldStyle {
    public static void main(String[] args) {
        List<String> names = new ArrayList<String>();
        names.add("maya");
        names.add("rohit");
        names.add("ana");

        Collections.sort(names, new Comparator<String>() {
            public int compare(String a, String b) {
                return a.length() - b.length();
            }
        });

        List<String> upper = new ArrayList<String>();
        for (String name : names) {
            if (name.length() > 3) {
                upper.add(name.toUpperCase());
            }
        }
        System.out.println(upper);
    }
}
Terminal
$ java OldStyle.java
[MAYA, ROHIT]
NewStyle.java
void main() {
    var names = List.of("maya", "rohit", "ana");

    var upper = names.stream()
            .sorted(Comparator.comparing(String::length))
            .filter(name -> name.length() > 3)
            .map(String::toUpperCase)
            .toList();

    IO.println(upper);
}
Terminal
$ java NewStyle.java
[MAYA, ROHIT]
What’s happening
  1. The old version builds a mutable ArrayList, writing <String> on both sides, and adds the names one by one.
  2. It sorts with an anonymous inner class: a whole Comparator object written out just to pass one function, a.length() - b.length(). Shortest first gives ana, maya, rohit.
  3. Then a classic loop keeps names longer than 3 characters and uppercases them into a second list: [MAYA, ROHIT].
  4. The new version has no class at all: a file with just a void main() is a compact source file (Java 25). java.util is imported automatically, which is why List and Comparator work without an import line.
  5. var (Java 10) lets the compiler infer List<String>; List.of (Java 9) makes an immutable list in one call.
  6. The stream (Java 8) does sort, filter and map as one pipeline, with method references (String::length, String::toUpperCase) and a lambda (name -> name.length() > 3) where the old code needed classes and loops. toList() (Java 16) collects the result. Same output: [MAYA, ROHIT].
  7. Both files ran on Java 25 unchanged. That's the other thing to know about Java: old code keeps working, so real codebases mix both styles, and you'll need to read both.
AdvancedCheck which Java you are running
Hello.java
void main() {
    IO.println("Java " + Runtime.version().feature());
}
Terminal
$ java Hello.java
Java 25
What’s happening
  1. Runtime.version() describes the running JVM, and .feature() is its major number: 25.
  2. A quick way to check which Java a terminal really runs, without reading the longer java -version output.
AdvancedWhat hasn't changed since Java 6

What hasn't changed is just as useful to know: Java is still statically typed, still class-based, still runs on the JVM, still has checked exceptions, and still takes backward compatibility very seriously. The style changed; the foundations didn't.

AdvancedGotcha: preview features can still change

#The JDK, the JVM and bytecode

Added

Three names that get mixed up all the time:

  • The JVM (Java Virtual Machine) runs bytecode: a compact, platform-independent instruction set stored in .class files.
  • The JDK (Java Development Kit) is what you install: the JVM plus the compiler javac and tools like jar, javap, jshell and jcmd.
  • The JRE (runtime only) was a separate download until Java 8. Since Java 11 you just install a JDK; teams that want a small runtime build one for their app.

The pipeline is compile first, then run: javac turns Greeter.java into Greeter.class, and java starts a JVM that loads the class and runs it. Compare that with Node.js, where V8 receives the JavaScript source itself and compiles it while the program runs. In both cases a JIT compiler turns hot code into machine code at run time (chapter 10 has the details), but Java does the parsing and type checking ahead of time. That's why a Java type error never reaches production as a runtime surprise the way a JavaScript typo can.

The mental model: bytecode is Java's portable assembly language. The same .class file runs on a Mac, Linux or Windows JVM; "write once, run anywhere" means the JVM is ported, not your code.

Greeter.java
public class Greeter {
    public static void main(String[] args) {
        int total = add(2, 3);
        System.out.println("Total: " + total);
    }

    static int add(int a, int b) {
        return a + b;
    }
}
Terminal
$ javac Greeter.java
$ ls
Greeter.class
Greeter.java
$ java Greeter
Total: 5
$ javap -c Greeter
Compiled from "Greeter.java"
public class Greeter {
  public Greeter();
    Code:
         0: aload_0
         1: invokespecial #1                  // Method java/lang/Object."<init>":()V
         4: return

  public static void main(java.lang.String[]);
    Code:
         0: iconst_2
         1: iconst_3
         2: invokestatic  #7                  // Method add:(II)I
         5: istore_1
         6: getstatic     #13                 // Field java/lang/System.out:Ljava/io/PrintStream;
         9: iload_1
        10: invokedynamic #19,  0             // InvokeDynamic #0:makeConcatWithConstants:(I)Ljava/lang/String;
        15: invokevirtual #23                 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
        18: return

  static int add(int, int);
    Code:
         0: iload_0
         1: iload_1
         2: iadd
         3: ireturn
}
What’s happening
  1. javac Greeter.java compiles the source and prints nothing when it succeeds. It writes Greeter.class next to the source, which ls shows.
  2. java Greeter takes a class name, not a file name (no .class): the JVM finds Greeter.class on the classpath (here the current folder), loads it and calls its main method. It prints Total: 5.
  3. javap -c disassembles the bytecode. add is four instructions: iload_0 and iload_1 push the two int arguments onto the operand stack, iadd adds them, ireturn returns the result. The JVM is a stack machine: instructions take their inputs from a stack rather than from registers.
  4. In main, iconst_2 and iconst_3 push the constants, invokestatic calls add (its type (II)I means "two ints in, int out"), and istore_1 saves the 5 in local variable 1, which is total.
  5. The string concatenation "Total: " + total became an invokedynamic call to makeConcatWithConstants: since Java 9 the compiler leaves the strategy for joining strings to the JVM at run time instead of generating StringBuilder code.
  6. There's also a constructor Greeter() you didn't write: the compiler adds a default constructor that just calls Object's.
AdvancedClass file versions and UnsupportedClassVersionError

Every .class file starts with the bytes CA FE BA BE and then a class file version: 52 for Java 8, 61 for Java 17, 65 for Java 21, 69 for Java 25 (the major version is the Java version plus 44). A JVM refuses class files newer than itself. This is one of the most common errors when a build and a server disagree about the Java version.

Greeter.java
public class Greeter {
    public static void main(String[] args) {
        System.out.println("Hello");
    }
}
Terminal
$ javac Greeter.java
$ javap -v Greeter | grep major
  major version: 69
$ javac --release 17 Greeter.java
$ javap -v Greeter | grep major
  major version: 61
What’s happening
  1. Compiled by javac 25 with no options, the class file says major version 69, so it needs a Java 25 JVM.
  2. --release 17 compiles for Java 17: the class file says 61, and javac also checks that you only used APIs that exist in Java 17. A Java 17, 21 or 25 JVM can run it.
  3. Running the version-69 file on a Java 21 JVM fails before main starts. That run was done separately (the checker only has Java 25), and Java 21 printed: java.lang.UnsupportedClassVersionError: Greeter has been compiled by a more recent version of the Java Runtime (class file version 69.0), this version of the Java Runtime only recognizes class file versions up to 65.0.
  4. The fix is always one of two: run a newer JVM, or compile with --release set to the oldest Java you deploy to. In Maven that's the java.version property (chapter 11).

#Running a Java program

Added

There are now three ways to run Java code, and you'll meet all three:

  1. Compile, then run (javac then java ClassName): the classic way, and what build tools do for you.
  2. Run the source file directly (java Hello.java, Java 11+): the JVM compiles it in memory and runs it, like node hello.js. Since Java 22 the file can use other .java files in the same folder.
  3. Compact source files (Java 25): a file with just methods and fields, no class around them, and a main that doesn't need to be public static or take String[] args.

The mental model: Java used to make you write a class, a public static void main(String[] args) and System.out.println before you could print a line. Java 25 lets a small program look like a small program. The ceremony still exists, and real applications still have it, but it's no longer the entry fee.

Sum.java
void main(String[] args) {
    int total = 0;
    for (String arg : args) {
        total += Integer.parseInt(arg);
    }
    IO.println(args.length + " numbers, total " + total);
}
Terminal
$ java Sum.java 3 4 5
3 numbers, total 12
$ java Sum.java 3 four
Exception in thread "main" java.lang.NumberFormatException: For input string: "four"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
	at java.base/java.lang.Integer.parseInt(Integer.java:565)
	at java.base/java.lang.Integer.parseInt(Integer.java:662)
	at Sum.main(Sum.java:4)
What’s happening
  1. The file has no class: it's a compact source file. Java wraps it in a class you can't name (it's derived from the file name) and calls its main.
  2. This main takes String[] args, the words after the file name: ["3", "4", "5"]. It could also be void main() when you don't need them.
  3. Integer.parseInt turns each string into an int, so total goes 0 → 3 → 7 → 12, and IO.println (a Java 25 helper in java.lang) prints 3 numbers, total 12.
  4. The second run passes four. Integer.parseInt("four") throws NumberFormatException, nothing catches it, so the JVM prints the exception and its stack trace and exits with status 1. The trace shows where it came from, bottom to top: your main at Sum.java:4 called parseInt, which failed inside the JDK.
  5. Compare with JavaScript: Number("four") gives NaN and carries on. Java fails fast and tells you exactly where.
AdvancedThe classic main method, word by word

The classic form, which every existing codebase and framework uses, looks like this. It's worth reading slowly once, because every word means something:

com/example/app/Main.java
package com.example.app;

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello from " + Main.class.getName());
    }
}
Terminal
$ javac -d out com/example/app/Main.java
$ java -cp out com.example.app.Main
Hello from com.example.app.Main
What’s happening
  1. public class Main: a public class must live in a file with the same name, Main.java, and the package line says it belongs to com.example.app, so the file sits in com/example/app/.
  2. public static void main(String[] args): public so the JVM can call it from outside, static so it runs without creating a Main object first, void because it returns nothing (the exit status comes from System.exit or an uncaught exception), and String[] args for the command-line words.
  3. javac -d out writes the compiled class into out/, recreating the package folders: out/com/example/app/Main.class.
  4. java -cp out com.example.app.Main says "look for classes in out" (the classpath) and names the class by its fully qualified name. It prints Hello from com.example.app.Main.
  5. System.out.println is the classic way to print; IO.println is the Java 25 shortcut. You'll see System.out everywhere, and in real services you'll use a logger instead (chapter 16).
AdvancedPrograms with several files

Since Java 22 the source launcher compiles the other .java files it needs from the same folder, so a small multi-file program needs no build step:

Main.java
public class Main {
    public static void main(String[] args) {
        var cart = new Cart();
        cart.add("Keyboard", 49.99);
        cart.add("Mouse", 19.50);
        System.out.println(cart.summary());
    }
}
Cart.java
import java.util.ArrayList;
import java.util.List;

public class Cart {
    private final List<Double> prices = new ArrayList<>();

    public void add(String name, double price) {
        prices.add(price);
    }

    public String summary() {
        double total = prices.stream().mapToDouble(Double::doubleValue).sum();
        return prices.size() + " items, total " + total;
    }
}
Terminal
$ java Main.java
2 items, total 69.49000000000001
$ ls
Cart.java
Main.java
What’s happening
  1. java Main.java compiles Main.java in memory, sees that it uses a class called Cart, finds Cart.java in the same folder and compiles that too.
  2. Main creates a Cart and adds two prices, and summary() sums them with a stream.
  3. The total prints as 69.49000000000001, not 69.49. That's not a Java bug: double is a binary floating-point number, exactly like a JavaScript number, and 49.99 can't be stored exactly in binary (in Node, 49.99 + 19.5 prints the same thing). For money, Java code uses BigDecimal (chapter 02).
  4. ls shows no .class files: source-launch mode compiles into memory only. Fine for scripts and learning; real projects use Maven or Gradle (chapter 11).

#Packages, imports and the classpath

Added

A package is a namespace for classes, and by convention it's your organisation's domain reversed: com.example.shop. The package also decides the folder: a class in com.example.shop.cart lives in com/example/shop/cart/. Its full name, com.example.shop.cart.Cart, is what the JVM actually uses.

An import is not what it is in JavaScript. import { Cart } from "./cart.js" loads and runs a module. Java's import com.example.shop.cart.Cart; only lets you write the short name Cart in your source; nothing is loaded at that point. The JVM loads a class the first time it's used, by looking for it on the classpath: the list of folders and JAR files it searches, a bit like Node walking up node_modules folders, except that you (or your build tool) give the list explicitly.

A JAR is a ZIP file of .class files plus a manifest. Libraries are JARs, and your app usually ends up as one too. Maven and Gradle download library JARs and build the classpath for you, which is why you rarely type -cp by hand at work. But when something goes wrong ("ClassNotFoundException"), it helps to know what they're doing.

com/example/shop/Main.java
package com.example.shop;

import com.example.shop.pricing.Discount;

public class Main {
    public static void main(String[] args) {
        System.out.println("Price after discount: " + Discount.apply(80.0, 25));
    }
}
com/example/shop/pricing/Discount.java
package com.example.shop.pricing;

public class Discount {
    public static double apply(double price, int percent) {
        return price * (100 - percent) / 100;
    }
}
Terminal
$ javac -d out com/example/shop/Main.java com/example/shop/pricing/Discount.java
$ find out -name '*.class' | sort
out/com/example/shop/Main.class
out/com/example/shop/pricing/Discount.class
$ java -cp out com.example.shop.Main
Price after discount: 60.0
$ jar --create --file shop.jar --main-class com.example.shop.Main -C out .
$ java -jar shop.jar
Price after discount: 60.0
$ java -cp . com.example.shop.Main
Error: Could not find or load main class com.example.shop.Main
Caused by: java.lang.ClassNotFoundException: com.example.shop.Main
What’s happening
  1. Discount is in package com.example.shop.pricing, so it lives in com/example/shop/pricing/. Main imports it, which only lets Main say Discount instead of com.example.shop.pricing.Discount.
  2. javac -d out compiles both and mirrors the packages as folders under out/, which find lists.
  3. java -cp out com.example.shop.Main runs it: 80.0 * 75 / 100 = 60.0, so it prints Price after discount: 60.0.
  4. jar --create … --main-class com.example.shop.Main -C out . packs everything under out into shop.jar and writes the main class into its manifest, so java -jar shop.jar runs it with no -cp and no class name. This is what a Spring Boot app's JAR is too, with its libraries packed inside (chapter 11).
  5. The last command uses the wrong classpath: . (the source folder) has no .class files for that package, so the JVM can't find the class: Error: Could not find or load main class com.example.shop.Main, Caused by: java.lang.ClassNotFoundException. When you see that error, the question is always "what's on the classpath, and is the class really there?"
AdvancedModules, briefly

Java 9 added the module system (JPMS): a module-info.java file that names a module, the modules it requires and the packages it exports. The JDK itself is split into modules (java.base, java.sql, java.net.http, …). Most applications, including typical Spring Boot apps, don't define modules of their own and stay on the classpath; you mainly meet modules through the JDK's names and tools like jlink.

Java 25 added module import declarations: import module java.sql; imports every public class of every package that module exports, the way compact source files import java.base automatically. It's a convenience for small programs and teaching; production code usually keeps explicit imports so a reader can see where each name comes from.

Modules.java
import module java.sql;

void main() {
    Timestamp start = Timestamp.valueOf("2026-01-01 09:30:00");
    IO.println(start);
}
Terminal
$ java Modules.java
Modules.java:4: error: reference to Timestamp is ambiguous
    Timestamp start = Timestamp.valueOf("2026-01-01 09:30:00");
    ^
  both class java.sql.Timestamp in java.sql and class java.security.Timestamp in java.security match
Modules.java:4: error: reference to Timestamp is ambiguous
    Timestamp start = Timestamp.valueOf("2026-01-01 09:30:00");
                      ^
  both class java.sql.Timestamp in java.sql and class java.security.Timestamp in java.security match
2 errors
error: compilation failed
What’s happening
  1. import module java.sql; should make every exported class of java.sql usable by its short name, including java.sql.Timestamp.
  2. But a compact source file also imports the whole java.base module automatically, and java.base has a different Timestamp: java.security.Timestamp. Two module imports now offer the same short name.
  3. The compiler refuses to guess: "reference to Timestamp is ambiguous … both class java.sql.Timestamp in java.sql and class java.security.Timestamp in java.security match". It's reported twice because the name appears twice on that line, and nothing runs.
  4. This is the trade-off of importing whole modules: you save import lines but can import clashes you didn't know existed. The fix is below.
Modules.java
import module java.sql;
import java.sql.Timestamp;

void main() {
    Timestamp start = Timestamp.valueOf("2026-01-01 09:30:00");
    IO.println(start);
}
Terminal
$ java Modules.java
2026-01-01 09:30:00.0
What’s happening
  1. A single-type import (import java.sql.Timestamp;) always beats on-demand and module imports, so Timestamp now means java.sql.Timestamp.
  2. Timestamp.valueOf parses the text and printing it adds the fractional seconds: 2026-01-01 09:30:00.0.
  3. Rule of thumb: module imports for scripts and small programs; explicit imports in application code, so every name's origin is visible.

#Setting up Java on a new Mac

Added

You need one thing: a JDK. Several companies build the same OpenJDK source code and give it away free: Eclipse Temurin (from the Adoptium project, the one used on this site), Amazon Corretto, Azul Zulu, Microsoft's build, and Oracle's own OpenJDK builds. For learning and for most jobs they're interchangeable. Pick an LTS version, which today means 25 (or whatever your target team runs: 17 or 21 are common).

The setup, step by step (these steps describe the official installers; they weren't run on this Mac, which uses the Temurin download instead):

  1. Install a JDK. Easiest: download the macOS .pkg installer for Temurin 25 from adoptium.net (pick "aarch64" for Apple Silicon) and run it. It installs into /Library/Java/JavaVirtualMachines/. If you'd rather have several versions side by side and switch per project, SDKMAN! (sdkman.io) does that from the terminal (sdk list java, then sdk install java <identifier>), a bit like nvm for Node.
  2. Check it in a new terminal with java -version. You should see the version you installed (the output for this site's JDK is below).
  3. Set JAVA_HOME if a tool asks for it (Maven and Gradle use it when present): add export JAVA_HOME=$(/usr/libexec/java_home -v 25) to ~/.zshrc. /usr/libexec/java_home -V lists every JDK macOS knows about.
  4. Pick an editor. Most Java teams use IntelliJ IDEA (JetBrains): it understands Maven and Spring, refactors safely and runs single tests with a click. VS Code works too with Microsoft's "Extension Pack for Java". You don't need either for this site: a terminal is enough.
  5. You don't need to install Maven or Gradle. Every Spring Boot project comes with a wrapper script (./mvnw) that downloads the right Maven the first time you run it, like npx does (chapter 11).
Terminal
$ java -version
openjdk version "25.0.5.1" 2026-11-17 LTS
OpenJDK Runtime Environment Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
What’s happening
  1. java -version prints to stderr, which is why some scripts miss it when they capture output; the Terminal box shows both.
  2. The first line is the version: 25.0.5.1, released 2026-11-17, an LTS build. Update releases like .0.5.1 are security and bug fixes; the feature number (25) is what matters for language features.
  3. The second line names the vendor build (Temurin), and the third the VM: "64-Bit Server VM" is HotSpot, the standard JVM. "mixed mode" means it interprets and JIT-compiles, and "sharing" means it uses the class data sharing archive to start faster (chapter 10).
AdvancedTip: the wrong Java on your PATH

#Your turn: running Java

Added
Your turn: the largest argument

Write a compact source file that prints the largest number you pass on the command line, so java Max.java 4 19 7 prints largest: 19.

Show answer
Max.java
void main(String[] args) {
    int largest = Integer.MIN_VALUE;
    for (String arg : args) {
        largest = Math.max(largest, Integer.parseInt(arg));
    }
    IO.println("largest: " + largest);
}
Terminal
$ java Max.java 4 19 7
largest: 19
What’s happening
  1. A compact source file: just void main(String[] args), no class, run directly with java Max.java.
  2. largest starts at Integer.MIN_VALUE (−2,147,483,648), so any real number replaces it; starting at 0 would be wrong for all-negative input.
  3. Each argument is parsed and Math.max keeps the bigger one: 4 → 19 → 19, printed as largest: 19.
Your turn: build for an older server

A server runs Java 17 and the team builds with JDK 25. Compile Report.java so the server can run it, and prove the class file is right.

Show answer
Report.java
public class Report {
    public static void main(String[] args) {
        System.out.println("report ready");
    }
}
Terminal
$ javac --release 17 Report.java
$ javap -v Report | grep major
  major version: 61
$ java Report
report ready
What’s happening
  1. --release 17 makes javac produce Java 17 class files and refuse APIs that Java 17 doesn't have, so you find out at compile time, not on the server.
  2. javap -v shows major version: 61, which is Java 17 (17 + 44). A Java 17 JVM accepts it; with no --release it would be 69 and fail with UnsupportedClassVersionError.
  3. A newer JVM still runs older class files, so java Report on Java 25 prints report ready.
Your turn: a runnable JAR

Put a class com.example.tools.Shout (it prints its arguments in capitals, joined by spaces) into a runnable shout.jar, so java -jar shout.jar hello world prints HELLO WORLD.

Show answer
com/example/tools/Shout.java
package com.example.tools;

public class Shout {
    public static void main(String[] args) {
        System.out.println(String.join(" ", args).toUpperCase());
    }
}
Terminal
$ javac -d out com/example/tools/Shout.java
$ jar --create --file shout.jar --main-class com.example.tools.Shout -C out .
$ java -jar shout.jar hello world
HELLO WORLD
What’s happening
  1. The package line and the folder agree: com/example/tools/Shout.java. javac -d out writes out/com/example/tools/Shout.class.
  2. jar --create … --main-class com.example.tools.Shout -C out . packs the contents of out and records the main class in the JAR's manifest.
  3. java -jar shout.jar hello world starts that main class with args = ["hello", "world"]. String.join(" ", args) gives hello world, toUpperCase() gives HELLO WORLD.

Written fresh, no doc. Examples were run with Eclipse Temurin 25.0.5.1 and Spring Boot 4.2.0 (Maven 3.10.1); facts come from openjdk.org, docs.oracle.com and spring.io, read 2026-11-26.

RohitDownloads · All chapters

Sync progress across devices

Type the same private phrase on your Mac and your phone, and your Learned ticks follow you between them — on every study site.

The phrase never leaves this device: only a fingerprint of it is sent, and the server stores a fingerprint of that. Anyone who knows the phrase could see or change your ticks, so pick something you don’t use elsewhere.

Sync is on in this browser.

Sync ID

This ID must be the same on every device. If another device shows a different one, its phrase is different (capital letters count): tap “Turn off here” on it and type the phrase again exactly.