W3Schools Learner's Blog

W3Schools Programming knowledge summary website



Kotlin Expression & Statement

 In this tutorial you will learn about the Kotlin Expression & Statement and its application with practical example.

Kotlin Expression

An expressions is consist of variables, operators, literals and method calls that evaluates to a value.


Here, num1+20 is an expression, the value of the expression is assigned to variable result.

Kotlin Statement

Kotlin statement is an executable statements, that tell the computer to perform a specification action.Program statement can be an input-output statements, arithmetic statements, control statements, simple assignment statements and any other statements and it also includes comments.


Here, 25 + 10 is an expression that returns 35, and val result= 25 + 10 is a statement.

Kotlin Block

In Kotlin, block is a group of statement(s) that is enclosed in curly braces { }.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.