/Kotlin-Source-Code-Examples

This page contains a list of Kotlin programming source code examples, data structures, and algorithms with output.

Kotlin-Source-Code-Examples

This page contains a list of Kotlin programming source code examples, data structures, and algorithms with output.

Kotlin is a general-purpose, free, open-source, statically typed “pragmatic” programming language initially designed for the JVM (Java Virtual Machine) and Android that combines object-oriented and functional programming features.

Kotlin Source Code Examples

Here is a list of Kotlin source code examples for Kotlin project development.
  1. Kotlin- Create Class Example
  2. Kotlin - for Loop Examples
  3. Kotlin - while and do-while loop example
  4. Kotlin - if statement example
  5. Kotlin - Nested if Statement Example
  6. Kotlin - if-else Statement Example
  7. Kotlin - if-else-if Statement Example
  8. Kotlin - when Expression Example
  9. Kotlin - break and continue Keyword Example
  10. Kotlin - Nested Class Example
  11. Kotlin - Inner Class Example
  12. Kotlin - Inheritance Example
  13. Kotlin - Abstract Class Example
  14. Kotlin Interface Example
  15. Kotlin Interfaces Inheritance Example
  16. Kotlin - Enum Class Example
  17. Kotlin - Enum Class Implementing Interfaces Example
  18. kotlin - Data Class Example
  19. Kotlin - Array Initialization Example
  20. Kotlin Array Basic Operations
  21. Kotlin - Sorting Arrays Example
  22. Kotlin - Two-Dimensional Arrays Example
  23. Kotlin - Find Array Elements Example

Kotlin Array

  1. Kotlin array initialization example
  2. Kotlin array basic operations
  3. Kotlin array count example
  4. Kotlin array traversal example
  5. Kotlin filtering arrays example
  6. Sorting arrays in Kotlin example

Kotlin String

  1. Kotlin String Looping Example
  2. Kotlin Remove Leading and Trailing Whitespaces Example
  3. Kotlin Remove All Whitespaces from a String Example
  4. Kotlin Empty/Blank String Example
  5. Kotlin String Case Example
  6. Kotlin Comparing Strings Example
  7. Kotlin String Interpolation Example
  8. Kotlin - Get First and Last Characters of a String Example
  9. Kotlin String Example

Kotlin List

  1. Kotlin List drop Example
  2. Kotlin List all Example
  3. Kotlin List any Example
  4. Kotlin List filter Example
  5. Kotlin List slice() Example
  6. Kotlin List contains() Example
  7. Kotlin List Sort Example - Ascending and Descending Order
  8. Kotlin List Iterate Example - forEach(), for Loop, forEachIndexed() and ListIterator
  9. Kotlin List first and last Element Example
  10. Kotlin List Count Example
  11. Kotlin List Indexing Example
  12. Kotlin List Example
  13. Kotlin listOf() Example

Kotlin Set

  1. Kotlin Set all Example
  2. Kotlin Set any Example
  3. Kotlin Set filter Example
  4. Kotlin Set union Example
  5. Kotlin mutableSetOf() Example
  6. Kotlin Set contains Example
  7. Kotlin Set Sort Example - Ascending and Descending Order
  8. Kotlin Set Iterate Example - forEach(), for Loop, forEachIndexed() and Iterator
  9. Kotlin Set first and last Element Example
  10. Kotlin Set count Example
  11. Kotlin Set indexing Example
  12. Kotlin Set Example
  13. Kotlin setOf() Example

Data Structures and Algorithms in Kotlin

Data Structures

Algorithms

  1. Bubble Sort Algorithm in Kotlin
  2. Heap Sort Algorithm in Kotlin
  3. Insertion Sort Algorithm in Kotlin
  4. Merge Sort Algorithm in Kotlin
  5. Quick Sort Algorithm in Kotlin
  6. Selection Sort Algorithm in Kotlin