<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Day 1: Intro to Java · Learn Java 25</title>
    <link>https://learn-java-25.pages.dev/02-intro-to-java/index.html</link>
    <description>The language basics: types, methods, collections, logic, control flow, files and a first HTTP call.</description>
    <generator>Hugo</generator>
    <language>en</language>
    <atom:link href="https://learn-java-25.pages.dev/02-intro-to-java/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Why Java?</title>
      <link>https://learn-java-25.pages.dev/02-intro-to-java/01-why-java/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://learn-java-25.pages.dev/02-intro-to-java/01-why-java/index.html</guid>
      <description>Java compiles to bytecode, which runs on the JVM — the same .class file works on Linux, macOS and Windows. A new release ships every six months, an LTS release every two years.&#xA;Version Year Highlights 8 2014 lambdas, streams, Optional, java.time 11 LTS 2018 HTTP client 17 LTS 2021 records, sealed classes, text blocks, switch expressions 21 LTS 2023 virtual threads, pattern matching for switch 25 LTS 2025 compact source files &amp; IO, module imports, scoped values Where it is used Backends (Spring Boot, Quarkus), Android, big data (Kafka, Spark, Elasticsearch), and most developer tooling.</description>
    </item>
    <item>
      <title>Basic Data Types</title>
      <link>https://learn-java-25.pages.dev/02-intro-to-java/02-basic-types/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://learn-java-25.pages.dev/02-intro-to-java/02-basic-types/index.html</guid>
      <description>Variables int count = 42; double price = 19.99; boolean active = true; String name = &#34;Ann&#34;; var count2 = 42; // same thing, type inferred final double VAT = 0.19; // constant var works for local variables only — not fields, parameters or return types.&#xA;Tip Make everything final that never changes. final var works too.</description>
    </item>
    <item>
      <title>Methods</title>
      <link>https://learn-java-25.pages.dev/02-intro-to-java/03-methods/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://learn-java-25.pages.dev/02-intro-to-java/03-methods/index.html</guid>
      <description>Return type, name, parameters, body:&#xA;int add(int a, int b) { return a + b; } void greet(String name) { // void = returns nothing IO.println(&#34;Hello, &#34; + name); } Arguments are copies Java is always pass-by-value. For objects the reference is copied — you can mutate the object, but not reassign the caller’s variable.</description>
    </item>
    <item>
      <title>Arrays &amp; Collections</title>
      <link>https://learn-java-25.pages.dev/02-intro-to-java/04-collections/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://learn-java-25.pages.dev/02-intro-to-java/04-collections/index.html</guid>
      <description>Arrays Fixed length, zero-based:&#xA;int[] numbers = new int[5]; String[] colors = {&#34;red&#34;, &#34;green&#34;, &#34;blue&#34;}; colors.length // 3 — a field, not a method colors[1] // &#34;green&#34; colors[3] // ArrayIndexOutOfBoundsException Arrays.sort(numbers); Arrays.toString(numbers); Arrays are rigid. In practice you use a List.&#xA;List Ordered, resizable, duplicates allowed:</description>
    </item>
    <item>
      <title>Boolean Logic</title>
      <link>https://learn-java-25.pages.dev/02-intro-to-java/05-boolean-logic/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://learn-java-25.pages.dev/02-intro-to-java/05-boolean-logic/index.html</guid>
      <description>There is no “truthy” A condition must be a boolean. Nothing else.&#xA;if (text) { … } // error if (!text.isEmpty()) { … } // ok if (count) { … } // error if (count != 0) { … } // ok Comparison Operator Meaning == != equal / not equal (identity for objects) &lt; &gt; &lt;= &gt;= ordering a.equals(b) // content comparison Objects.equals(a, b) // null-safe on both sides The wrapper trap — small values are cached:</description>
    </item>
    <item>
      <title>Loops &amp; Control Flow</title>
      <link>https://learn-java-25.pages.dev/02-intro-to-java/06-control-flow/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://learn-java-25.pages.dev/02-intro-to-java/06-control-flow/index.html</guid>
      <description>if / else if (temp &gt; 30) { IO.println(&#34;hot&#34;); } else if (temp &gt; 15) { IO.println(&#34;mild&#34;); } else { IO.println(&#34;cold&#34;); } Braces are optional for a single statement — always write them anyway.&#xA;switch Old form, needs break or it falls through:</description>
    </item>
    <item>
      <title>Working With Java Programs</title>
      <link>https://learn-java-25.pages.dev/02-intro-to-java/07-programs/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://learn-java-25.pages.dev/02-intro-to-java/07-programs/index.html</guid>
      <description>The classic structure public class Calculator { public static void main(String[] args) { System.out.println(&#34;start&#34;); } } public class Calculator — file must be Calculator.java static — the JVM can call it without an object String[] args — command line arguments The compact form (Java 25) does the same thing:&#xA;void main() { IO.println(&#34;start&#34;); } Both may contain fields and methods:</description>
    </item>
    <item>
      <title>APIs &amp; HTTP</title>
      <link>https://learn-java-25.pages.dev/02-intro-to-java/08-apis/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://learn-java-25.pages.dev/02-intro-to-java/08-apis/index.html</guid>
      <description>A web API answers HTTP requests with structured data, usually JSON.&#xA;Method Purpose Status Meaning GET read 2xx success POST create 3xx redirect PUT/PATCH update 4xx your mistake (404, 401, 429) DELETE delete 5xx server’s mistake The built-in HTTP client import java.net.URI; import java.net.http.*; void main() throws Exception { try (var client = HttpClient.newHttpClient()) { var request = HttpRequest.newBuilder() .uri(URI.create(&#34;https://api.github.com/repos/openjdk/jdk&#34;)) .header(&#34;Accept&#34;, &#34;application/json&#34;) .GET() .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); IO.println(response.statusCode()); IO.println(response.body()); } } Configuration:</description>
    </item>
  </channel>
</rss>