yet-another-kotlin-vs-java-comparison
yet-another-kotlin-vs-java-comparison copied to clipboard
Shows complete examples where the Kotlin code is compiled to bytecode and decompiled to Java
trafficstars
Yet Another Kotlin VS Java Comparison
This one shows complete examples where the Kotlin code is compiled to bytecode and decompiled to Java. Enabling a person familiar with Java to very quickly understand Kotlin.
Examples
The examples are organized like the examples in the Kotlin Reference.
Basics
- Control Flow
- Returns Jumps
Classes And Objects
- Classes And Inheritance
- Empty Class
- Constructor Param
- Init Order Demo
- Constructor To Attribute
- Init From Constructor
- Constructor With Annotation
- Secondary Constructor
- Default Values
- Instantiation
- Open Closed Data Object
- Inheritance
- Inheritance No Primary Constructor
- Override Method
- Derived Class Initialization Order
- Inner Class
- Overriding Rules
- Data Classes
- Generics
- Nested Classes
- Objects
- Properties
- Sealed Classes
Functions And Lambdas
- Functions
Mixed
- Extensions