Property & Method
- Kotlin mutable & immutable variable – val vs var
- Java Static Method equivalent in Kotlin
- Lazy Initialization Example
- Delegated Property – Observable Property
Operator
Function
String
- Split String example
- Convert comma-separated String into List & List into one String
- Convert String to Int
- Convert String to Long
Comparation
JSON
Collections
List
- Kotlin List & Mutable List tutorial with examples
- Kotlin Distinct() methods of List collection
- Kotlin List methods – max() maxBy() maxWith()
- Kotlin List methods – min() minBy() minWith()
- Kotlin List reduce(), reduceIndexed(), reduceRight(), reduceRightIndexed() methods example
- Kotlin filter List example
- Kotlin transform List with map() methods example
- Kotlin Flatten List – Problem & Solution
Map
- Kotlin Map methods – maxBy() maxWith()
- Kotlin Map methods – minBy() minWith()
- Kotlin convert Map to SortedMap
- Kotlin Map collection with flatMap(), flatMapTo() methods
- Kotlin – filter() map examples
- Kotlin Map collection – map() methods
Array
- Kotlin Flatten Array
- Kotlin Array find the Largest Element – max() maxBy() maxWith() methods
- Kotlin Array find the Smallest Element – min() minBy() minWith() methods
- Kotlin – average() function with Kotlin Array – List examples
- Kotlin Array sort(), sortBy(), sortWith()
Others
- Sort List of Objects with Comparator Example
- Sort List of Objects with Comparable Example
- Convert comma-separated String into List & List into one String
- Kotlin sum() and sumBy() method for List, Map of Objects example
- Kotlin Partition method – split List, Map of Objects example
- Kotlin Fold Example
- Convert Kotlin Map to List
- Convert Kotlin List to Map
- Kotlin forEach & forEachIndexed method on Array, List, Map collection
- Kotlin Loop: for loop + while loop + break & continue example
- Kotlin methods – any(), none(), all(), contains()
- Kotlin collection methods – groupBy(), sumByDouble(), mapValues(), toSortedMap() example
- Kotlin onEach() vs forEach() example
Files – I/O
- How to read File in Kotlin
- How to write to file in Kotlin
- Kotlin get File Name example
- How to read/write CSV file in Kotlin
- How to read/write CSV file with Apache Commons CSV
- How to read/write CSV file with OpenCSV
- How to read/write Excel file with Apache POI
- How to read/write QR Code with ZXing
Kotlin DateTime
- Kotlin – Get Current Date/Time
- Kotlin Convert String to DateTime
- Kotlin DateTime – get Today, Tomorrow, Yesterday with LocalDate, ZonedDateTime
- Kotlin DateTime API examples
Sample for Practice
- Sort List of Objects with Comparator Example
- Sort List of Objects with Comparable Example
- Kotlin Comparable Binary Search for Object List
- Kotlin Comparator Binary Search for Object List
- Sort Object List with Kotlin Selector function – crossinline selector: (T) -> R?
- Binary Search for Object List with Comparison function – comparison: (T) -> Int
- Binary Search for Object List with Selector function – crossinline selector: (T) -> K?
- Kotin – toString() – convert Kotlin Data Class Object to String
- Kotlin – Encode (Decode) File/Image to Base64