DEV Community

sunj
sunj

Posted on

Kotlin 조건식, 2024-03-17

fun example1(a : Int, b : Int) : Int {
   if(a>b){
     return a
   }else{
     return b
   }
}
Enter fullscreen mode Exit fullscreen mode
fun example2(a : Int, b : Int) = if(a>b) a else b
Enter fullscreen mode Exit fullscreen mode

위 아래는 같은 조건식이다

참조 : 유투브 강의 Code with Joyce

Top comments (0)