Kotlin Programming

  1. Kotlin Basics and Syntax
    1. Writing Your First Kotlin Program
      1. Structure of a Kotlin File
        1. The `main` Function
          1. Printing Output with `println()`
            1. Compiling and Running Kotlin Code
              1. Understanding Compilation Process
              2. Variables and Data Types
                1. Declaring Variables
                  1. Immutable Variables (`val`)
                    1. Mutable Variables (`var`)
                      1. Variable Naming Conventions
                      2. Basic Data Types
                        1. Numeric Types
                          1. Int
                            1. Long
                              1. Float
                                1. Double
                                  1. Byte
                                    1. Short
                                      1. Unsigned Types
                                      2. Boolean Type
                                        1. Character Type
                                          1. String Type
                                            1. String Literals
                                              1. String Templates
                                                1. Multiline Strings
                                                  1. Raw Strings
                                                2. Type Inference
                                                  1. Explicit Type Declarations
                                                    1. Type Conversion and Casting
                                                      1. Safe Casts (`as?`)
                                                        1. Unsafe Casts (`as`)
                                                          1. Smart Casts
                                                            1. Type Checks (`is` and `!is`)
                                                            2. Constants
                                                              1. Compile-Time Constants (`const`)
                                                                1. Runtime Constants
                                                              2. Operators
                                                                1. Arithmetic Operators
                                                                  1. Comparison Operators
                                                                    1. Equality Operators
                                                                      1. Logical Operators
                                                                        1. Assignment Operators
                                                                          1. Increment and Decrement Operators
                                                                            1. The `in` Operator
                                                                              1. Range Operators
                                                                                1. Operator Precedence
                                                                                  1. Operator Overloading Introduction
                                                                                  2. Null Safety
                                                                                    1. Nullable Types (`?`)
                                                                                      1. Non-Null Types
                                                                                        1. Safe Calls (`?.`)
                                                                                          1. The Elvis Operator (`?:`)
                                                                                            1. Not-Null Assertion Operator (`!!`)
                                                                                              1. Safe Casts (`as?`)
                                                                                                1. Null Checks and Smart Casts
                                                                                                  1. Platform Types
                                                                                                  2. Control Flow
                                                                                                    1. Conditional Expressions
                                                                                                      1. `if-else` Statements
                                                                                                        1. `if-else` as an Expression
                                                                                                          1. Nested Conditionals
                                                                                                          2. `when` Expressions
                                                                                                            1. `when` as a Statement
                                                                                                              1. `when` as an Expression
                                                                                                                1. Using `when` without an Argument
                                                                                                                  1. Ranges and Type Checks in `when`
                                                                                                                    1. Multiple Conditions
                                                                                                                    2. Loops
                                                                                                                      1. `for` Loops
                                                                                                                        1. Iterating over Ranges
                                                                                                                          1. Iterating over Collections
                                                                                                                            1. Iterating with Indices
                                                                                                                            2. `while` Loops
                                                                                                                              1. `do-while` Loops
                                                                                                                              2. Ranges
                                                                                                                                1. Creating Ranges
                                                                                                                                  1. Stepping and Reversing Ranges
                                                                                                                                    1. Range Types
                                                                                                                                    2. Breaking and Continuing Loops
                                                                                                                                      1. `break` and `continue`
                                                                                                                                        1. Labeled `break` and `continue`
                                                                                                                                          1. Nested Loops and Labels
                                                                                                                                          2. Return and Jump Expressions
                                                                                                                                          3. Comments and Documentation
                                                                                                                                            1. Single-Line Comments
                                                                                                                                              1. Multi-Line Comments
                                                                                                                                                1. KDoc Documentation
                                                                                                                                                  1. Documentation Tags