Java is often criticized for being too verbose, but some verbosity can be your friend, especially if it makes the source code more understandable. That's an overview, but there's a lot more to learn about how Kotlin differs from Java and, in many cases, improves on it. In Kotlin, semicolons are optional, and therefore line breaks are significant. There are no semicolons in this function. ![]() Where Java uses void, Kotlin uses Unit, and if the return type of a function is Unit, it may be omitted. ![]()
0 Comments
Leave a Reply. |