This repository contains various files related to the learning progression of Kotlin language. Different files contain examples of different features of the Kotlin language.
The main source material for the progression in this repo is the Official Kotlin Docs. However, some other tutorials and guides were also followed.
The following table contains the names of different features learned and experimented with alongside the files in which there is some sample code to demonstrate it. Some files have been used to test more than 1 feature.
| Feature | Files |
|---|---|
| Data class | Employee.kt |
| If_else_when conditions | Conditions.kt |
| Variables | Variables.kt |
| String Interpolation | Variables.kt |
| Loops and Ranges | LoopsAndRanges.kt |
Labels, return, break, continue |
LabelsAndReturn.kt |
| Functions | Functions.kt |
| Top level variables & functions | TopLevel.kt |
| Classes | Person.kt |
| Primary contructor | Person.kt |
| Secondary contructor | Item.kt |
| Init function and class methods | Employee.kt |
| Custom setters and getters | Item.kt |
| Inheritance | Inheritance.kt |
Note on Any() class |
Authenticate.kt |
object keyword |
Authenticate.kt |
companion object keyword |
Inheritance.kt |
| Interfaces | Interface.kt |
| Access modifiers | Inheritance.kt |
| Type checking, casting, smart casting | ExploreCast.kt |
enum class |
Course.kt |
| Nullable and Non-nullable types | ExploreNulls.kt |
| Collections | ExploreCollections.kt |
| Lambdas and higher order functions | ExploreLambdas.kt |
| Filter operation | CollectionOperations.kt |
| Map operation | CollectionOperations.kt |
| FlatMap operation | CollectionOperations.kt |
| HashMap operations | CollectionOperations.kt |
| Using Sequences in Collections | CollectionSequences.kt |
| Null Collections | CollectionOperations.kt |
| Exception handling | ExploreExceptions.kt |