Classes and Objects in Java: Fields, Constructors and Encapsulation
A practical introduction to object-oriented Java, covering classes, objects, fields, constructors, this, encapsulation with getters and setters, toString, equals and records.
A practical introduction to object-oriented Java, covering classes, objects, fields, constructors, this, encapsulation with getters and setters, toString, equals and records.
Store and look up data by key with HashMap. Learn put, get, getOrDefault, merge and iteration, then see how hashing, buckets and equals/hashCode work inside.
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 the Java Stream API step by step, covering filter, map, sorted, reduce, collect, groupingBy and Optional, with a realistic example and the pitfalls to avoid.
Everything a beginner needs about Java Strings, including immutability, the string pool, equals vs ==, 15 everyday methods, text blocks and StringBuilder.
Learn how Java stores data: the eight primitive types, reference types, type casting, var and the mistakes beginners make most often.
A senior developer praised one of our students for his clean code. Here is what Uncle Bob says clean code is, why it matters, and six practical Java habits that will make your code cleaner today.