Learning path

Java

12 lessons on Java, in the order we recommend.

  1. 1

    Java Introduction

    What Java is, why it powers banks, Android and big companies, how the JDK, JRE and JVM fit together, and your very first Java program explained line by…

    4 min read
  2. 2

    Installing Java and Running Programs

    Install the JDK on Windows, Mac or Linux, compile and run with javac and java, try code instantly in JShell, and set up IntelliJ IDEA or VS Code…

    3 min read
  3. 3

    Java Variables and Data Types

    Declare variables, learn Java's eight primitive types, String, var, constants with final, type casting, integer overflow and naming rules, with clear examples.

    4 min read
  4. 4

    Java Operators and Expressions

    Arithmetic, assignment, comparison, logical, increment and ternary operators in Java, operator precedence, short-circuit evaluation and the Math class.

    4 min read
  5. 5

    Java Strings

    Create and use Strings in Java, the most useful String methods, why == fails and equals() works, the string pool, immutability, StringBuilder and text blocks.

    4 min read
  6. 6

    Java User Input with Scanner

    Read numbers and text from the keyboard with Scanner, avoid the nextInt/nextLine trap, validate input, and print neat output with printf.

    4 min read
  7. 7

    Java If, Else and Switch

    Make decisions in Java with if, else if, else, nested conditions, the classic switch statement and the modern switch expression with arrows and yield.

    4 min read
  8. 8

    Java Loops

    Repeat work with for, while, do-while and the enhanced for-each loop, control loops with break and continue, nested loops for patterns, and avoid infinite loops.

    4 min read
  9. 9

    Java Arrays

    Store many values in one variable with Java arrays, loop over them, find max and average, use 2D arrays for grids, and save time with the Arrays utility…

    4 min read
  10. 10

    Java Methods

    Write reusable Java methods with parameters and return values, understand pass-by-value, overload methods, use varargs and watch recursion on the call stack.

    4 min read
  11. 11

    Java ArrayList and Collections

    Use ArrayList, LinkedList, HashSet and TreeSet, understand how an ArrayList grows, generics, wrapper classes, autoboxing, iterating safely and the Collections utility class.

    5 min read
  12. 12

    Java HashMap and Maps

    Store key-value pairs with HashMap, LinkedHashMap and TreeMap, count frequencies with merge and getOrDefault, iterate entries, and see how hashCode picks a bucket.

    4 min read