Introduction to Kotlin
Get started with Kotlin by learning everything you need to know to create your first basic program!
StartKey Concepts
Review core concepts you need to learn to master this subject
The main()
Function
The main()
Function
fun main() {
// Code goes here
}
The main()
function is the starting off point of every Kotlin program and must be included in the code before execution.
Introduction to Kotlin
Lesson 1 of 1
- 1Welcome to the world of coding with Kotlin! Kotlin is a programming language that, after its release in 2016 by JetBrains, quickly gained popularity amongst develope…
- 2What better way to start learning about Kotlin than to run a Kotlin program? Before we run our first program, let’s take a moment to understand our current environment. Code is written and edited …
- 3Think of writing code like going on an adventure: we always need to start somewhere. In Kotlin, the journey begins in the main() function. The main() function is the “jumping off” point for our …
- 4In the last exercise, we were able to display the text Coding is fun! in the output terminal with the following code: fun main() { println(“Coding is fun!”) } We accomplished this feat using a p…
- 5Similar to instructions in a recipe, code is read, compiled, and executed in a top-down order. When we run a program, a compiler translates our Kotlin co…
- 7While every programmer is different, there is one experience we all share: getting an error message. An error, or bug, causes our programs to behave in unexpected ways. When we receive an error me…
- 8In programming, formatting conventions are the suggested rules for how code should be structured in a specific programming language. By following Kotlin’s formatting standards, or coding convention…
- 9Great job completing the first lesson on learning Kotlin! Let’s go over all the content we have discussed: * Kotlin is a general-purpose programming language. * The main() function is the starting …
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory