Section 01 ยท Stage 1: Learn Java
Java Basics
Foundational programming from zero: syntax, variables, operators, conditionals, loops, methods, arrays, strings, and exceptions.
What you will learn
1.1Getting Started7 lessons
What Java is, what the JDK, JRE and JVM are, how to install Java, how to set up one IDE (VS Code, IntelliJ IDEA or Eclipse), and how to write and run your first program.
1.2Variables & Data Types9 lessons
Store values in variables, meet Java's data types (int, long, double, float, char, boolean and String), convert between types, make constants with final, and fix common beginner mistakes.
1.3Operators8 lessons
Do calculations with arithmetic operators, change variables with =, +=, ++ and --, compare values, join conditions with &&, || and !, pick one of two values with ?:, and learn the order Java runs operators in.
1.4Input & Output7 lessons
Print output with println, print and printf, read keyboard input with Scanner, choose between next() and nextLine(), fix common input errors, and build small console programs.
1.5Conditional Statements9 lessons
Make decisions in Java with if, if-else and else-if ladders, join checks with && and ||, nest one if inside another, pick a case with switch and arrow switch expressions, and fix common condition bugs.
1.6Loops8 lessons
Repeat code with loops: write for, while and do-while loops, trace a loop to find totals and counts, stop or skip rounds with break and continue, print patterns with nested loops, and fix common loop mistakes.
1.7Methods10 lessons
Split a program into small methods: define and call a method, send values in with parameters, get a result back with return, understand local variables and pass-by-value, overload a method, start with recursion, and fix common method mistakes.
- Why use methods?14 min
- Define and call a method18 min
- Parameters and arguments20 min
- Return a value from a method22 min
- Local variables and scope20 min
- Pass-by-value: a method gets a copy16 min
- Method overloading18 min
- Recursion: a method that calls itself22 min
- Common mistakes and practice35 min
- Must-do problems: Methods150 min
1.8Arrays11 lessons
Store many values in one variable with arrays: create an array, read and change elements by index, loop through it with for and for-each, find totals, largest values and matches, pass arrays to methods, use 2D arrays and the Arrays class, and fix common array mistakes.
- What is an array?14 min
- Creating an array18 min
- Reading and changing array elements20 min
- Looping through an array22 min
- The for-each loop18 min
- Sum, average, largest and search28 min
- Arrays and methods25 min
- 2D arrays: rows and columns25 min
- The Arrays class: print, sort and compare20 min
- Common mistakes and practice35 min
- Must-do problems: Arrays150 min
1.9Strings11 lessons
Work with text in Java: read characters by index, search with indexOf, cut text with substring, change case and trim, compare Strings with equals(), loop through characters, split and parse text, build text with StringBuilder, and fix common String mistakes.
- String recap: characters and index positions18 min
- Search in a String: indexOf, contains, startsWith20 min
- Cut out part of a String with substring()20 min
- Change case, trim and replace (Strings never change)22 min
- Compare Strings: equals() and compareTo()22 min
- Loop through the characters of a String25 min
- Split, join and turn text into numbers25 min
- Build and change text with StringBuilder22 min
- Common mistakes and practice35 min
- Must-do problems: Strings150 min
- String methods: quick reference10 min
1.10Exception Basics9 lessons
Handle runtime errors so a program does not crash: read a stack trace, recognise common exceptions, use try, catch and finally, throw an exception and declare it with throws, and keep asking until the user types valid input. Custom exception classes come later in the OOP section.
1.11Packages, Imports & Access Control6 lessons
Organize Java classes into packages: see why packages exist, create your own package and run it, use classes from other packages with import, control who can use a class, field or method with public, private and default access, and build a small app from two packages.
1.12Java Basics Mini Projects5 lessons
Put Java Basics together in five small console projects: a calculator, a number guessing game, a student marks report, a text analyzer and an ATM simulator. Each project is built step by step, pushed to GitHub and submitted as a link.
