JAVA
Java — Beginner
Start from zero with Java: install the JDK, run your first program, and learn the fundamentals — types, decisions, loops, methods, arrays, strings and your first classes. All examples run with Java 21 using a single `java File.java` command.
Lessons
- 1Setting up JavaInstall the JDK, understand the main method, and run your first program.
- 2Variables, Types & StringsPrimitive types, String, var, casting, integer division and formatting output.
- 3Decisions, Switch & Loopsif / else, switch expressions, the ternary operator, for, enhanced for, while and do-while.
- 4MethodsDefine static methods with parameters and return types, overload them, and pass values.
- 5Arrays & StringsCreate and process arrays, use the Arrays helper class, and build text with StringBuilder.
- 6Classes & ObjectsFields, constructors, methods, encapsulation with private fields, and toString.
- 7Reading Input with ScannerRead what the user types with Scanner, validate it, keep asking until it's right, and format output with printf.
- 8Dates & Times with java.timeLocalDate, Period, ChronoUnit, formatting and parsing, time zones with ZonedDateTime, and Duration.