Orientation

intro2HistoryOfJava

Path
pkg0intro/intro2HistoryOfJava.java
Package
pkg0intro
Study order
2
Run
Single-file source launch
Command
java pkg0intro/intro2HistoryOfJava.java

There is no in-browser runner. This is the file from the curriculum, unchanged.

pkg0intro/intro2HistoryOfJava.java
1package pkg0intro;2 3/*4 * intro2HistoryOfJava.java5 * ------------------------6 * THE HISTORY OF JAVA, as a runnable timeline.7 *8 * ORIGIN:9 *   Java began in 1991 at Sun Microsystems in the "Green Project" led by10 *   James Gosling, Mike Sheridan, and Patrick Naughton. It was first called11 *   "Oak" (after a tree outside Gosling's office), then "Green", and finally12 *   "Java" (after Java coffee). It was designed for interactive television /13 *   embedded devices, but found its killer use on the web.14 *15 *   Public release: 1995 (JDK 1.0, 1996). Slogan: "Write Once, Run Anywhere".16 *   Oracle acquired Sun Microsystems in 2010 and now stewards Java.17 *   Since Java 9 (2017), a new version ships every 6 months; LTS releases18 *   (8, 11, 17, 21, 25) are the long-term-support targets for most companies.19 */20public class intro2HistoryOfJava {21    record Milestone(String when, String what) {}22 23    public static void main(String[] args) {24        System.out.println("=== THE HISTORY OF JAVA ===\n");25 26        Milestone[] timeline = {27            new Milestone("1991", "'Green Project' starts at Sun; language named 'Oak' by James Gosling"),28            new Milestone("1995", "Renamed 'Java'; publicly announced; 'Write Once, Run Anywhere'"),29            new Milestone("1996", "JDK 1.0 released"),30            new Milestone("1998", "J2SE 1.2 ('Java 2'): Swing, Collections Framework"),31            new Milestone("2004", "J2SE 5.0: generics, enums, autoboxing, varargs, annotations"),32            new Milestone("2006", "Java 6: performance, scripting API; Java open-sourced (OpenJDK)"),33            new Milestone("2010", "Oracle acquires Sun Microsystems"),34            new Milestone("2011", "Java 7: try-with-resources, diamond, NIO.2, Fork/Join"),35            new Milestone("2014", "Java 8: lambdas, Streams, Optional, new Date/Time (huge release)"),36            new Milestone("2017", "Java 9: modules (JPMS), jshell; 6-month release cadence begins"),37            new Milestone("2018", "Java 10 (var) & Java 11 (LTS): HttpClient, run single-file source"),38            new Milestone("2020", "Java 14: records (preview), switch expressions (final)"),39            new Milestone("2021", "Java 17 (LTS): sealed classes, records final, pattern matching"),40            new Milestone("2023", "Java 21 (LTS): virtual threads, record patterns, sequenced collections"),41            new Milestone("2025", "Java 25 (LTS): latest long-term-support release")42        };43 44        for (Milestone m : timeline)45            System.out.printf("  %-6s  %s%n", m.when(), m.what());46 47        System.out.println("\nWHY THE NAME CHANGES?  Oak -> Green -> Java (trademark + 'Java coffee').");48        System.out.println("STEWARDSHIP: Sun Microsystems (1991-2010) -> Oracle (2010-present), via OpenJDK.");49        System.out.println("LTS releases: 8, 11, 17, 21, 25  (most production systems target these).");50    }51}