Memra
programming · beginner

Java from Zero

Zero to hire-ready — and OCP-exam ready

A complete Java curriculum: 107 lessons across 21 modules, from your first class through OOP, generics, collections, lambdas and streams, exceptions, concurrency, I/O, modules, JDBC and the practical idioms a junior developer is expected to know. Aligned to the OCP Java SE 17 Developer (1Z0-829) objectives. Read a little, type the code, retrieve it cold — spaced by FSRS.

Start course →
0 / 107 lessons

Getting Started

  1. What Java is: JDK, JVM & bytecode 8 min
  2. Your first class and the main method 9 min
  3. Compile and run 7 min

Variables, Types & Operators

  1. Primitive types & literals 10 min
  2. Variables, assignment & var 8 min
  3. Operators & precedence 10 min
  4. Casting & numeric promotion 9 min
  5. Strings, immutability & text blocks 10 min
  6. StringBuilder: efficient text assembly 7 min
  7. Wrapper classes, autoboxing & parsing 8 min

Control Flow

  1. if / else if / else 7 min
  2. The switch statement 8 min
  3. Switch expressions & pattern matching 9 min
  4. Loops: while, do-while, for, for-each 9 min
  5. break, continue & labels 7 min

Arrays

  1. Declaring, instantiating & initializing arrays 8 min
  2. Accessing & iterating: indexes, .length, and bounds 8 min
  3. Multidimensional & jagged arrays 7 min
  4. The Arrays utility class 8 min
  5. Varargs 7 min

Methods & Encapsulation

  1. Defining & calling methods 7 min
  2. Method overloading & overload resolution 8 min
  3. Static vs instance: fields and methods 8 min
  4. Pass-by-value: the most-misunderstood Java rule 9 min
  5. Access modifiers & encapsulation 9 min

Classes & Objects

  1. Classes, objects, new & constructors 8 min
  2. Constructor overloading & this() 8 min
  3. Initialization order: static, instance, and constructor 9 min
  4. final fields, final variables & immutability 8 min
  5. Object: the root of every class 8 min

Inheritance & Polymorphism

  1. extends, super() & constructor chaining 9 min
  2. Overriding vs hiding: @Override, covariant returns & access rules 9 min
  3. Polymorphism & dynamic dispatch 9 min
  4. Casting, instanceof & pattern matching 8 min
  5. abstract classes & methods — and final 8 min
  6. equals, hashCode & toString done right 10 min

Interfaces

  1. Declaring & implementing interfaces 8 min
  2. default, static & private interface methods 9 min
  3. The diamond problem with default methods 8 min
  4. Functional interfaces & @FunctionalInterface 7 min
  5. Comparable<T> vs Comparator<T> 9 min

Enums, Records, Sealed & Nested Types

  1. Enums: constants, fields, constructors & switch 9 min
  2. Records (Java 16+) 8 min
  3. Sealed classes & interfaces (Java 17) 8 min
  4. Nested types: static nested, inner, local & anonymous 9 min

Generics

  1. Why generics: type safety and the diamond operator 7 min
  2. Generic classes: type parameters and conventions 8 min
  3. Generic methods: declaring and calling 7 min
  4. Bounded type parameters: extends and multiple bounds 8 min
  5. Wildcards and PECS: producer-extends, consumer-super 9 min
  6. Type erasure: generics at runtime 8 min

Collections

  1. Framework overview: Collection vs Map 7 min
  2. List: ArrayList vs LinkedList 8 min
  3. Set: HashSet, LinkedHashSet, TreeSet 8 min
  4. Map: HashMap, LinkedHashMap, TreeMap and key operations 9 min
  5. Queue and Deque: ArrayDeque as stack and queue 7 min
  6. Sorting, choosing the right structure, and fail-fast iterators 9 min

Lambdas & Streams

  1. Lambda syntax & effectively-final capture 9 min
  2. Built-in functional interfaces (java.util.function) 9 min
  3. Method references: the four kinds 8 min
  4. Optional<T>: a container for absent values 8 min
  5. Stream basics: source → intermediate → terminal 9 min
  6. Terminal ops & Collectors 10 min
  7. Primitive streams: IntStream, LongStream, DoubleStream 8 min

Exceptions

  1. The Throwable hierarchy: checked vs unchecked 8 min
  2. throw vs throws: raising and declaring 8 min
  3. Multi-catch & catch order 7 min
  4. try-with-resources & AutoCloseable 9 min
  5. Custom exceptions & common built-ins 9 min

Dates, Numbers & Localization

  1. LocalDate, LocalTime & LocalDateTime 9 min
  2. Instant, Duration, Period & ZonedDateTime 9 min
  3. Formatting & parsing with DateTimeFormatter 8 min
  4. BigDecimal & BigInteger — exact arithmetic 9 min
  5. Locale, NumberFormat & resource bundles 8 min

I/O & NIO.2

  1. Byte streams vs character streams 8 min
  2. Reading & writing text with try-with-resources 8 min
  3. NIO.2: Path & Files 9 min
  4. Directory traversal with Files.list and Files.walk 7 min
  5. Serialization: Serializable, ObjectStreams & serialVersionUID 7 min

Concurrency

  1. Threads & Runnable 9 min
  2. Callable, Future & ExecutorService 9 min
  3. Thread safety: synchronized, volatile & atomic 10 min
  4. Concurrent collections & CompletableFuture 9 min
  5. Deadlock, livelock & safe design strategies 8 min

The Module System (JPMS)

  1. Why modules: strong encapsulation & reliable configuration 8 min
  2. requires, exports, and qualified exports 9 min
  3. provides/uses (ServiceLoader) and opens for reflection 8 min
  4. Building & running modular apps 9 min

JDBC

  1. JDBC architecture: drivers, connections & the four core interfaces 8 min
  2. Querying with PreparedStatement and ResultSet 9 min
  3. executeUpdate, INSERT/UPDATE/DELETE & SQL injection 8 min
  4. Resource management & transactions 9 min

Annotations & Reflection

  1. Built-in annotations: @Override, @Deprecated, @SuppressWarnings and friends 7 min
  2. Declaring custom annotations 8 min
  3. Meta-annotations: @Retention, @Target, @Documented, @Inherited, @Repeatable 9 min
  4. Reflection basics: Class<?>, getDeclaredFields, and reading annotations at runtime 9 min

Practical Java for the Job

  1. equals & hashCode done right 9 min
  2. Immutability & defensive copies 8 min
  3. Static factories & the Builder pattern 9 min
  4. Project structure & build tools 7 min
  5. Testing with JUnit 5 8 min
  6. Logging, design patterns & debugging 9 min

Exam Readiness & Capstone

  1. Gotcha roundup I — values & flow 9 min
  2. Gotcha roundup II — types & objects 9 min
  3. Gotcha roundup III — APIs 9 min
  4. Exam strategy 7 min
  5. Capstone: a small Java program, end to end 10 min
NORMAL ~/memra/learn/java-from-zero utf-8 LF