Loading…
Loading…
Java
The Core Java course: the language, the JVM, objects, inheritance, interfaces, generics, collections, concurrency, annotations and the module system. Targets Java 21+ with notes through Java 27.
Three classic uses of Java interfaces: callbacks with listener interfaces and timers, custom sort orders with Comparator and its contract, and object cloning with Cloneable, shallow vs deep copies, covariant clone, array clone, and modern alternatives like copy constructors.
kvi5hnuCode Sprout team member13 minSince Java 8 and 9, interfaces can contain code. Learn static factory methods in interfaces, private helper methods, default methods and why they enable interface evolution, source vs binary compatibility, and the rules for resolving default method conflicts with X.super.method().
kvi5hnuCode Sprout team member10 minLearn Java interfaces from the ground up: interfaces as contracts, implementing Comparable to sort objects, the compareTo rules and pitfalls with doubles, interface variables and instanceof, extending interfaces, constants, multiple interfaces, and interfaces versus abstract classes.
kvi5hnuCode Sprout team member12 minSeven practical rules for Java class hierarchies: put common code in superclasses, avoid protected fields, inherit only for true is-a relationships, keep inherited methods meaningful, honor the substitution principle, prefer polymorphism over type tests, and use reflection sparingly.
kvi5hnuCode Sprout team member9 minFinish Java reflection: create arrays of any type with java.lang.reflect.Array, grow arrays generically like Arrays.copyOf, call methods with Method.invoke, invoke constructors with arguments, handle InvocationTargetException, and compare reflection with method handles and lambdas.
kvi5hnuCode Sprout team member9 minUse Java reflection to inspect any class at runtime: Field, Method, Constructor and RecordComponent, getDeclaredFields vs getFields, Modifier and AccessFlag, sealed and record metadata, reading and writing fields with setAccessible, module restrictions, and a generic toString.
kvi5hnuCode Sprout team member13 minStart with Java reflection: what it is for, getting Class objects with getClass, Class.forName and .class literals, odd array type names, comparing Class objects, creating instances by name, a primer on checked exceptions, and loading resources with getResource and getResourceAsStream.
kvi5hnuCode Sprout team member12 minMaster pattern matching for switch (Java 21+): type patterns, record patterns, unnamed variables, case null, guards with when, exhaustiveness rules, dominance, constant labels, MatchException, and scope and fall-through rules, with runnable examples.
kvi5hnuCode Sprout team member10 minJava sealed classes and interfaces (final since Java 17) let you list exactly which classes may extend a type. Learn sealed, permits, final and non-sealed, the placement rules, exhaustive switch without default, records and enums in sealed hierarchies, and when to choose sealed types.
kvi5hnuCode Sprout team member8 minJava enums are full classes with a fixed set of instances. Learn to compare with ==, use name, valueOf, values, ordinal and compareTo, add fields, constructors and methods, write constant-specific behavior, switch over enums, and use EnumMap and EnumSet.
kvi5hnuCode Sprout team member8 minLearn when and how to use abstract classes in Java: declaring abstract methods as placeholders, mixing fields and concrete methods, why abstract classes can't be instantiated, abstract variables referring to concrete subclasses, the template method pattern, and abstract classes versus interfaces.
kvi5hnuCode Sprout team member7 minWrite Java methods that accept any number of arguments with varargs (Type... args): how the compiler packs arguments into an array, passing arrays directly, rules and restrictions, overloading with varargs, the null ambiguity, @SafeVarargs and heap pollution, and performance tips.
kvi5hnuCode Sprout team member7 minJava's wrapper classes Integer, Double, Boolean and friends explained: why ArrayList<int> isn't allowed, how autoboxing and unboxing work, the == trap and the Integer cache, NullPointerException on unboxing, parseInt and other static helpers, MIN_VALUE pitfalls, and performance costs.
kvi5hnuCode Sprout team member10 minUse Java's ArrayList, the resizable array: declaring ArrayList<Employee> with var and the diamond operator, add, get, set, insert and remove, size versus capacity, ensureCapacity and trimToSize, for-each loops, converting to arrays, Java 21 getFirst/getLast, and raw-type compatibility.
kvi5hnuCode Sprout team member12 minHow Java's hashCode and toString methods work and how to override them: the equals/hashCode contract, why HashSet breaks without it, Objects.hash and Arrays.hashCode, avoiding collisions, writing toString with getClass().getName(), printing arrays, and identity versions of both.
kvi5hnuCode Sprout team member10 minObject is the superclass of every Java class. Learn what Object variables can hold, the difference between == and equals, how to write a correct equals method, the five rules of the equals contract, getClass vs instanceof in class hierarchies, and the classic mistakes to avoid.
kvi5hnuCode Sprout team member10 minControl and navigate Java class hierarchies: final classes and methods (and why constructors should never call overridable methods), casting object references safely, ClassCastException, pattern matching for instanceof, record patterns, and how protected access really works.
kvi5hnuCode Sprout team member13 minUnderstand polymorphism in Java: the is-a rule and substitution principle, declared vs actual types, why arrays are covariant and throw ArrayStoreException, the exact steps of a method call (overload resolution, static vs dynamic binding, method tables), covariant return types and override rules.
kvi5hnuCode Sprout team member12 minLearn Java inheritance step by step: defining subclasses with extends, what a subclass inherits, overriding methods and calling super.method(), the @Override annotation, subclass constructors with super(...), inheritance hierarchies, and why Java has no multiple inheritance of classes.
kvi5hnuCode Sprout team member11 minSeven practical rules for designing Java classes: keep data private, initialize everything, replace primitive clusters with classes, skip needless getters and setters, split classes with several responsibilities, choose good names, and prefer immutability, illustrated with records and enums.
kvi5hnuCode Sprout team member9 min