[Kotlin Tutorial] Documenting Kotlin code [Kotlin Tutorial] Documenting Kotlin code 출처 : Kotlin in action 1. Writing Kotlin documentation comments -Java 의 Javadoc 만들 때와 비슷하다.Kotlin 의 것은 KDoc 이라 부른다. -KDoc 은 /** 로 시작하고 tag 는 마찬가지로 @ 로 시작한다.Javadoc 과의 가장 큰 차이가 있다면 HTML 대신 Markdown 을 사용한다는 것이다./** * Calculates the sum of two numbers, [a] and [b] */fun sum(a: Int, b: Int) = a+b 정의를 참조하려면 [ ] 안에 이름을 넣어주면 된다. cf) Markdown 은 text-to-HTML conve.. 2017. 9. 20. 반응형 이전 1 다음