Java Basics
Java if, else and switch: Making Decisions in Your Code
How to make decisions in Java with if, else if, else, the classic switch statement and modern switch expressions, plus the bugs to avoid.
How to make decisions in Java with if, else if, else, the classic switch statement and modern switch expressions, plus the bugs to avoid.
Learn every kind of Java loop, when to use each one, how break and continue work, and how to avoid infinite loops and off-by-one errors.
Learn how to write Java methods, pass parameters, return values, overload methods and understand why Java is always pass-by-value.
Arithmetic, comparison, logical, assignment, increment and ternary operators in Java, with examples, precedence rules and common traps.
Learn how Java stores data: the eight primitive types, reference types, type casting, var and the mistakes beginners make most often.