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.
Share data between Java threads without bugs: memory visibility and volatile, final fields, AtomicInteger and compareAndSet, LongAdder, lazy holder initialization, safe publication, lock-ordering deadlocks, ThreadLocal, InheritableThreadLocal and ScopedValue.
kvi5hnuCode Sprout team member14 minMake threads wait for a condition safely with Condition.await and signalAll, then learn Java's built-in alternative: synchronized methods and blocks, intrinsic locks, wait and notifyAll, choosing lock objects, client-side locking, and the monitor concept.
kvi5hnuCode Sprout team member13 minWhy unsynchronized threads corrupt shared data, shown step by step with a lost-update race, and how to fix it with ReentrantLock: the lock/try/finally idiom, critical sections, reentrancy and hold counts, tryLock, fair locks, and the mistakes that cause bugs.
kvi5hnuCode Sprout team member10 minCoordinate many concurrent tasks in Java: invokeAll to wait for every result, invokeAny to take the first success, timeouts, ExecutorCompletionService for results in completion order, structured concurrency, and the fork-join framework with RecursiveTask, RecursiveAction and work stealing.
kvi5hnuCode Sprout team member10 minRun tasks that return results with Callable and Future, then let an ExecutorService manage threads: fixed, cached and single-thread pools, virtual-thread-per-task executors, get with timeouts, cancellation, Future.state and resultNow, closing executors, and throttling with semaphores.
kvi5hnuCode Sprout team member11 minEverything about Java thread properties: virtual threads and carrier threads (Java 21), cooperative cancellation with interrupt, handling InterruptedException correctly, daemon threads, names and IDs, uncaught exception handlers, priorities, and thread builders and factories.
kvi5hnuCode Sprout team member12 minThe Java thread life cycle explained: the six Thread.State values, what moves a thread between NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING and TERMINATED, how platform and virtual threads are scheduled, join with timeouts, and why stop, suspend and resume are gone.
kvi5hnuCode Sprout team member9 minStart your first Java threads: what threads are compared with processes, putting a task in a Runnable, starting it with Thread.start, waiting with join, why calling run() is a bug, Java 21 thread builders, and why you shouldn't subclass Thread. Includes a two-thread bank transfer example.
kvi5hnuCode Sprout team member8 minJava 1.0's legacy collections and what to use today: Hashtable vs HashMap, Enumeration and how to convert it, Properties files with defaults and UTF-8, system properties, why Stack lost to ArrayDeque, and BitSet with a sieve of Eratosthenes example.
kvi5hnuCode Sprout team member11 minThe algorithms in java.util.Collections and Arrays: stable sorting with comparators, shuffling, binary search and insertion points, min, max, reverse, rotate, removeIf and replaceAll, set operations with retainAll and removeAll, toArray, and writing your own generic algorithms.
kvi5hnuCode Sprout team member11 minList.of, Set.of, Map.of and copyOf versus Collections.unmodifiableList, Arrays.asList, subList and range views, reversed views, newSetFromMap, and checked and synchronized wrappers. Learn which give independent copies and which give live windows, plus the null and ordering pitfalls.
kvi5hnuCode Sprout team member12 minMaster Java map views (keySet, values, entrySet) and Map.Entry, then the specialized maps and sets: LinkedHashMap with access order and an LRU cache, SequencedMap, EnumSet and EnumMap, IdentityHashMap, and WeakHashMap with its garbage-collector tricks.
kvi5hnuCode Sprout team member12 minA practical guide to Java's Map interface: HashMap versus TreeMap, put, get and getOrDefault, iterating with forEach, and updating entries the modern way with merge, compute, computeIfAbsent and putIfAbsent. Includes word counting, multimaps, and the null-value pitfalls.
kvi5hnuCode Sprout team member10 minLearn Java's Queue, Deque and PriorityQueue: offer/poll/peek versus add/remove/element, ArrayDeque as a fast queue and stack, Java 21 sequenced methods, and how a binary heap gives a priority queue O(log n) add and remove, with job scheduling and top-k examples.
kvi5hnuCode Sprout team member10 minHow Java's HashSet and TreeSet work: hash codes, buckets, collisions, load factor and rehashing, HashSet.newHashSet, the danger of mutating set elements, red-black tree sorted sets, comparators that disagree with equals, and NavigableSet methods like floor, ceiling and headSet.
kvi5hnuCode Sprout team member12 minHow Java's LinkedList and ArrayList work inside, when each one wins, and how to use ListIterator to add, set and remove while you walk a list. Covers fail-fast iterators, ConcurrentModificationException, the get(i) loop trap, and why Vector is obsolete.
kvi5hnuCode Sprout team member13 minA tour of the Java collection interfaces: Collection versus Map, List with random access and the remove(int) trap, Set equality, SortedSet and NavigableSet, the Java 21 SequencedCollection, SequencedSet and SequencedMap, RandomAccess, and an overview of all concrete collection classes.
kvi5hnuCode Sprout team member9 minStart the Java Collections Framework: why interfaces are separate from implementations, the Collection and Iterable interfaces, how iterators work between elements, next, hasNext and remove, forEach, bulk operations, and building your own collection with AbstractCollection.
kvi5hnuCode Sprout team member13 minLearn what reflection can reveal about Java generics despite erasure: the generic Class<T> class, matching Class<T> parameters, the Type interface with TypeVariable, WildcardType, ParameterizedType and GenericArrayType, and type literals (super type tokens) for generic types.
kvi5hnuCode Sprout team member10 minThe complete list of Java generics restrictions and their workarounds: no primitives, instanceof only on raw types, no generic arrays, @SafeVarargs, new T() and new T[], static context, generic exceptions, sneaky throws, erasure clashes and record pattern exhaustiveness.
kvi5hnuCode Sprout team member14 min