What is this in Kotlin fun max(num1 : Int, num2 : Int): Int = if(num1>num2) num1 else num2


Warning: Trying to access array offset on false in /home3/indiakep/public_html/wp-content/plugins/dw-question-answer/inc/Template.php on line 8
All QuestionsCategory: KotlinWhat is this in Kotlin fun max(num1 : Int, num2 : Int): Int = if(num1>num2) num1 else num2
chetan shidling asked 5 years ago

fun max(num1 : Int, num2 : Int): Int = if(num1>num2) num1 else num2

1 Answers
chetan shidling answered 5 years ago

It is function for the if-else statement to find the maximum value.