Kotlin throw keywordKotlin throw keyword is used to throw an explicit exception. It is used to throw a custom exception. To throw an exception object we will use the throw-expression. Syntax of throw keywordKotlin throw example Let's see an example of throw keyword in which we are validating age limit for driving license. Output: Exception in thread "main" java.lang.ArithmeticException: under age Next TopicKotlin Nullable Non Nullable Types |