Programming in Kotlin: Fundamentals

Aug 9 2022 Kotlin 1.6, Android 12, IntelliJ IDEA CE 2022.1.3

Part 1: Use Data Types & Operations

1. Introduction

Lesson Complete

Play Next Lesson
Next
Save for later
About this episode
See versions
See forum comments
Cinema mode Mark as Complete Download course materials
Next episode: 2. Setup a Project in IntelliJ IDEA

No prerequisite programming knowledge is needed to follow along this course. You just need a decent computer and a strong commitment to learning.

Hello there! Welcome to the Programming in Kotlin: Fundamentals course.

In this course, you’ll learn all the fundamental concepts you need to know, to program crazy and cool things in one of the most beautiful programming languages out there - Kotlin.

Specifically, you’ll learn how to assign and manipulate values

You’ll also see how to manage the flow of your programs - how to execute a piece of code multiple times, without having to write it more than once, or execute code only if a condition is met.

You’ll see how to declare your own functions to wrap powerful behavior to make it reusable. Finally, you’ll learn how to work with values which may or may not be there - also called Nullables.

If you’re interested in Android development, and you’re new to Android please check out “Your First Kotlin Android App: An app from scratch” and the “the polishing the app” courses before diving into this one!

Those courses will get you started with concepts of Android development, as well as some of the core concepts in the Kotlin programming language, by making a small and fun app called Bullseye.

If you haven’t checked it out, don’t worry, you’ll go over these concepts in this course once more!

If you have already watched “Your First Kotlin Android App” courses, you’ve already learned five major core concepts in Kotlin!

The first is declaring variables and constants.

When you want to declare a variable, meaning that its value can be changed, you use var. If you don’t want that value to change - you want to declare a constant, you use val.

The second is using the standard Kotlin types, such as Int, which represent whole numbers - like 1, 2 and 3, or Strings, which represent a series of characters, for example the name "John".

The third concept is about converting and comparing types and values. For example, you can turn a String into an Integer, or vice versa.

The fourth concept you’ve learned is about branching in programming, using if statements. When you use an if, you can tell the program what to do, if some condition is met, or what else it needs to do, if it isn’t.

Within the if, you put the condition you want to check, and within the block, the code that runs, if that condition is true.

And the last concept is about declaring your own functions, and using functions which already exists in the system. You can call functions by using their name, and adding parentheses at the end. And if there are any parameters the function takes, you have to pass in appropriate arguments.

Functions can return values, but they don’t have to.

Don’t worry if these concepts seem overwhelming, or if you haven’t grasped them entirely. You can review the previous course, or keep watching this one, because I’ll make sure you can recite and recognize them in your sleep! :]

This course will start off, by giving you a glimpse into several new concepts from programming in Kotlin.

In the first part, you’ll download and install the IntelliJ IDEA, the official integrated development environment for Kotlin, made by JetBrains.

You’ll refresh your knowledge of constants and variables, and how the standard Kotlin data types work. You’ll learn about comments, and how using them can sometimes clarify, or even document your code!

You will use Boolean expressions, to represent if your code meets a condition or not, and if statements to branch the code, according to those conditions.

All this will give you a good amount of knowledge, to handle more complex topics in Kotlin and programming. I’m just too excited to start writing some Kotlin code, and I hope you are too!

So buckle up, and let’s get started! :]