24. Data class
data class Customer(var name: String, var email: String)
Neither need to create getter/setter manually, nor use the Lombok
25. Inner Function
fun dfs(graph: Graph) {
fun dfs(current: Vertex, visited: Set<Vertex>) {
if (!visited.add(current)) return
for (v in current.neighbors)
dfs(v, visited)
}
dfs(graph.vertices[0], HashSet())
}
26. Inner Function
fun dfs(graph: Graph) {
fun dfs(current: Vertex, visited: Set<Vertex>) {
if (!visited.add(current)) return
for (v in current.neighbors)
dfs(v, visited)
}
dfs(graph.vertices[0], HashSet())
}
34. Which projects are using Kotlin in LINE
• LINE android: 77% Java, 23% Kotlin
• Line Creator Studio (LINE拼貼): 100% Kotlin
• Clova SDK
• and others...
35. Summary
• If you don’t have any programming experience, learn Java first.
• If you are experienced Java developer, you should try Kotlin now.
• No doubt Kotlin will become more and more popular.