Skip to content

Glossary: Kotlin Beyond the Basics

require and check

Also written: require, check

Functions that throw if a condition is false: `require` throws `IllegalArgumentException` (bad input) and `check` throws `IllegalStateException`.

Where the book teaches it

Related terms

assertEquals