I saw a tutorial says that this function
fun max(a: Int, b: Int): Int {
return if (a < b) a else b
}
can be converted into expression body
fun max(a: Int, b: Int): Int = if (a < b) a else b
I know there are statement, expression, and block concepts in Java.
But I didn't have idea what does expression body actually mean..?
Thanks in advance.