This post shows how to check if a key exists in a Map in Kotlin. There are three ways to do this in Kotlin. Note that we are using Kotlin 1.3. Check Key Exists Using Map containsKey Method This method
Kotlin – create static fields and methods
This post demonstrates how to create static class members similar to that of Java. We use Kotlin 1.1 here
Kotlin – val versus var
What is the difference between the keywords val and var in Kotlin? If you’re coming from Java, val refers to variable that cannot be updated after it has been assigned a value; while var is the usual writable variable whose value can always be changed by other codes.
Java 8 – Reuse Predicates by combining Lambdas
This post demonstrates how to reuse Predicate @FunctionalInterface implementations to reduce duplicate codes in your applications.
Kotlin Enum examples
When we have a fixed set of predefined constants, it is considered a good practice grouping them in an enum type.
Using Spring Autowired in Kotlin
This post shows an example of how to use @Autowired to inject @Service object in @Controller object Kotlin.
Kotlin – Using Java 8 Date and Time API
This post shows sample Kotlin codes that use the Java 8 Date and Time API (java.time). Requirements These are Software applications used for this post. IntelliJ IDEA Ultimate 2016.3 The Community Edition may be enough but we have not tried
Kotlin – Check if a certain values exists in a list
This post shows examples of codes to check if certain values exists in a list.
Kotlin – Convert comma-separated String to a List
This post shows how to convert a comma-separated strings (CSVs) to a list and back. In Kotlin, we can create both immutable or mutable lists.
Spring MVC with Spring Boot, Kotlin, and Thymeleaf
This post shows a sample Spring MVC application developed with Spring Boot, Kotlin, and Thymeleaf. Generally speaking, it is now possible and safe to port your Java-based Spring MVC application codes to Kotlin or start writing new Spring MVC applications in Kotlin already.