Courses

Learn Kotlin

18 lessons · 0 completed

Start
0%
  1. 1 Welcome to Kotlin: Setup and First Steps The 'Why': Motivation and Kotlin's SuperpowersEnvironment Setup: Installing the JDK and IntelliJ IDEAYour First Kotlin Program: 'Hello World'Playground and REPL: Testing Code Quickly
  2. 2 Core Fundamentals: Storing and Typing Data Variables: The Magic of 'val' (Immutable) vs 'var' (Mutable)Data Types: Numbers, Booleans, and Type InferenceString Templates: Elegant Text FormattingBasic Math Operations and Type Conversions
  3. 3 Control Flow: Making Decisions in Code If-Else Expressions: Returning Values from ConditionsThe 'When' Expression: Kotlin's Switch on SteroidsFor Loops and Ranges: Iterating with EleganceWhile Loops, Break, and Continue
  4. 4 Functions: The Building Blocks of Kotlin Defining Functions: Parameters and Return TypesDefault and Named Arguments: Goodbye Method OverloadingSingle-Expression Functions: Writing Concise CodeVarargs: Accepting a Variable Number of Arguments
  5. 5 Null Safety: Fixing the Billion Dollar Mistake Nullable vs Non-Nullable Types: The '?' ModifierSafe Calls ('?.') and the Elvis Operator ('?:')The Not-Null Assertion ('!!'): When to Use and AvoidSafe Casting: The 'as?' Operator
  6. 6 Collections: Grouping and Managing Data Arrays vs Lists: Understanding the DifferenceMutable vs Immutable Collections: Safe Data HandlingSets and Maps: Unique Items and Key-Value PairsBasic Collection Operations: Iterating, Adding, and Removing
  7. 7 Object-Oriented Programming I: Classes and Objects Classes and Primary ConstructorsProperties: Getters, Setters, and Field BackingThe 'init' Block and Secondary ConstructorsVisibility Modifiers: Public, Private, Protected, Internal
  8. 8 Object-Oriented Programming II: Inheritance and Blueprints Interfaces: Defining Contracts and Default ImplementationsInheritance: The 'open' Keyword and SuperclassesOverriding Methods and PropertiesAbstract Classes: Partial Implementations
  9. 9 Specialized Classes: Kotlin's Class Superpowers Data Classes: Free Boilerplate (equals, hashCode, toString, copy)Enum Classes: Representing Fixed Sets of ValuesSealed Classes and Interfaces: Restricting Class HierarchiesObject Declarations: Singletons and Companion Objects
  10. 10 Functional Programming: Treating Functions as Data Lambdas: Anonymous Functions and SyntaxHigher-Order Functions: Passing Functions as ArgumentsThe 'it' Keyword and Trailing Lambda ConventionCollection Transformations: map, filter, and reduce
  11. 11 Scope Functions: Writing Idiomatic Kotlin The 'let' Function: Null Checks and MappingThe 'apply' and 'also' Functions: Object ConfigurationThe 'with' and 'run' Functions: Context SwitchingChoosing the Right Scope Function
  12. 12 Exception Handling: Dealing with the Unexpected The try-catch-finally BlocksThrowing Exceptions and Custom Exception ClassesUsing 'try' as an ExpressionThe 'Nothing' Type: Functions that Never Return
  13. 13 Extension Functions: Adding New Behaviors Writing Your First Extension FunctionExtension Properties: Adding State-less FieldsExtensions on Nullable TypesExploring Kotlin's Standard Library Extensions
  14. 14 Generics: Writing Reusable, Type-Safe Code Generic Classes and Functions: The '<T>' SyntaxType Bounds: Constraining Generic TypesVariance Simplified: Understanding 'in' and 'out'Reified Type Parameters: Preserving Types at Runtime
  15. 15 Coroutines I: Asynchronous Programming Basics What are Coroutines? Lightweight Threads ExplainedSuspend Functions: Pausing and Resuming ExecutionCoroutine Builders: launch, async, and runBlockingDispatchers: Managing Threads (Main, IO, Default)
  16. 16 Coroutines II: Concurrency Management Jobs and Cancellation: Stopping Background WorkStructured Concurrency: CoroutineScope and ContextException Handling in CoroutinesManaging Shared State: Mutex and Thread-safe Data
  17. 17 Kotlin Flows: Reactive Asynchronous Streams Flow Basics: Emitting and Collecting DataIntermediate Operators: map, filter, and transformTerminal Operators: collect, toList, and firstStateFlow and SharedFlow: Managing App State
  18. 18 Real-World Kotlin: Interop and Tooling Java Interoperability: Calling Java from Kotlin and Vice VersaGradle for Kotlin: Understanding the Build SystemUnit Testing with JUnit and KotlinMocking Dependencies with MockK