Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 523 Bytes

concise.md

File metadata and controls

19 lines (14 loc) · 523 Bytes
```kotlin /* Create a POJO with getters, setters, `equals()`, `hashCode()`, `toString()` and `copy()` in a single line: */

data class Customer(val name: String, val email: String, val company: String)

// Or filter a list using a lambda expression:

val positiveNumbers = list.filter { it > 0 }

// Want a singleton? Create an object:

object ThisIsASingleton { val companyName: String = "JetBrains" }

</div>