내부 함수
함수 내부에 존재하는 함수

fun showMyPlus(_first: Int, _second: Int): Int 
{ 
    fun double(_number_: Int): Int 
    { 
	return _number_ * _number_ 
    } 

    return double(_first) + double(_second) 
} 

 

'Android > Kotlin' 카테고리의 다른 글

kotlin 07. Control flow (제어흐름 if)  (0) 2020.08.11
kotlin 06. Operator (연산자)  (0) 2020.08.11
Kotlin 04. Function (함수, Method)  (0) 2020.08.11
Kotlin 03. Variable, Type & Null  (0) 2020.08.11
Kotlin 02. Type (자료형)  (0) 2020.08.11

+ Recent posts