Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class User(
val name: String,
val age: Int
) {
init {
require(name.length in (2..25))
require(age in (0..110))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment