Language basics: Java
Основы языка Java для backend-разработчика с нуля: синтаксис и типы, ООП, коллекции, дженерики, исключения, лямбды и Stream API, записи и современный Java, инструменты.
The first phase of the program — the Java language itself, before the frameworks. From scratch and in plain terms: how types and syntax work, what is behind OOP, how collections and generics work, how to handle exceptions, lambdas and data streams, what is new in modern Java, and what to build a project with. Best read in order.
- Java syntax and types: where code begins — Basic Java syntax in plain terms: variables and var, primitives vs objects, autoboxing, immutable strings, operators and control structures.
- OOP in Java: classes, inheritance, interfaces, record and enum — Object-oriented programming in Java in plain terms: classes and objects, encapsulation, inheritance, interfaces, polymorphism, record and enum.
- Java collections: lists, sets and maps — List, Set and Map in plain terms: which implementations exist, when to choose which, how to iterate, why equals/hashCode matter, and how to make immutable collections.
- How HashMap works inside — What is under HashMap's hood: the bucket array, the index by hashCode, collisions and linked lists, the tree at the threshold of 8, the 0.75 load factor, resizing, and why equals is needed.
- Generics in Java: type safety without casting — Why generics are needed, how to write generic classes and methods, what ? extends and ? super mean, and why type erasure changes the rules of the game.
- Exceptions in Java: hierarchy, checked/unchecked, try-with-resources — How exceptions work in Java: the Throwable hierarchy, checked and unchecked, try/catch/finally, try-with-resources, custom exceptions, and the frequent anti-patterns.
- Lambdas and the Stream API in Java — What functional interfaces, lambdas and method references are, how the Stream API works (filter/map/reduce/collect), and when a stream beats a plain loop — and when it is the other way around.
- Records, Optional and modern Java — How record removes the boilerplate in data classes, Optional saves you from NPE, and switch, sealed classes, pattern matching and text blocks make Java 21 code shorter and clearer.
- Garbage collection in Java — Why automatic garbage collection is needed, how the heap and generations are structured, which collectors exist (Serial, Parallel, G1, ZGC), and what the -Xms/-Xmx flags set.
- Java tooling: JDK, javac, jar, Maven and Gradle — What the JDK, JRE and JVM are, how to compile with javac and run with java, what is inside a jar, why you need Maven and Gradle, and how to manage the JDK version.