Posts

Showing posts with the label JVM

Programming Tutorial Bits: Kotlin Data Classes

Image
Programming Tutorial Bits: Kotlin Data Classes https://www.youtube.com/watch?v=Telif4fZtrs This is a great place to start learning Kotlin if you have even basic Java experience.  More videos to come. In this video we will learn:  How to use data classes in Kotlin.   How to decompile Kotlin code to understand what it provides  What Kotlin improves on from Java with data classes   We will also touch on Nullable and Non-Nullable types and what happens when we try to call a non Nullable type with null form Java (Oh noes!!!) Clarifications:  Auto Get and Set generation:   If the member is declared with var and is accessible to class users (not private etc) you have access to setters and getters - If it is declared with "val" this NO SETTERS are generated. "val" is essentially like declaring "final" in Java the world.   EXPERIMENT AND TRY IT OUT! :) !! Not-Null assertion operator I touched a little the ...