21 maio 2018
Posted by Aleks Haecky, Training Developer & Word Artist, Google+, LinkedIn, Medium
The Kotlin Bootcamp Udacity course is a free, self-paced online course that teaches you the basics of the Kotlin programming language. This introduction to Kotlin was created by Google experts in collaboration with Udacity and is for people who already know how to program.
The Kotlin language lets you create apps in less time, writing less code, and with fewer errors.
This modern object-oriented language offers a strong type system, type inference, null safety, properties, lambdas, extensions, coroutines, higher-order functions, and many other features. Kotlin is so concise that you can create complete data classes with a single line of code.
Kotlin is officially supported for building Android apps, fully interoperates with the Java programming language and libraries, and is included with IntelliJ and Android Studio.
In this course you will learn everything you need to program in Kotlin, including:
You'll learn how to use extension functions to add helpful functionality to existing classes.
Extend built-in types:
fun Int.print() = println(this) 5.print() // prints 5
Extend Android classes:
fun Context.toast(text: CharSequence, duration: Int = Toast.LENGTH_SHORT): Toast { return Toast.makeText(this, text, duration).apply { show() } } toast("Hello Toast")
Extend your own classes:
class AquariumPlant( val color: String) fun AquariumPlant.print() = println("Pretty Aquarium Plant") val plant = AquariumPlant("green") plant.print() // prints -> Pretty Aquarium Plant
When you've completed the course, you will be able to create programs in Kotlin, taking advantage of the features and capabilities that make Kotlin unique.
The course is available free, online at Udacity; take it in your own time at your own pace.
Go learn how to build apps with less code at https://www.udacity.com/course/ud9011.