Hello, welcome to BackToCoding. Today, we’ll be talking about “Introduction
to Kotlin” Before we get started, don’t forget to hit
that subscribe button & the bell icon so that, whenever I publish a video, you get notified
instantly about it. Kotlin first appeared in 2011, but was popular
in 2017 when Google announced that, “Kotlin is now Google’s preferred language for Android
app development”. Now the question for every Android developer
who’s using Java is, “Why to switch to Kotlin when you already have Java?” which
I too had, when I first heard about Kotlin. So in this series of videos, we’re going
to see, “Why Android developer’s nowadays are preferring Kotlin over Java”. So let’s quickly get started with the Kotlin
series. First, we’ll start with our setup.
The tool that we’ll be using to create Kotlin projects is IntelliJ IDEA from JetBrains.
And let me tell you that, JetBrains is the company behind Kotlin. Kotlin was introduced
by the team at JetBrains and hence it is highly integrated into IntelliJ IDEA.
And IntelliJ IDEA is nothing but the IDE i.e. Integrated Development Environment similar
to NetBeans for Java, Visual Studio for C# or Dot Net and so on. And you use an IDE for writing your code,
compiling it and then running it. Also an IDE suggests you if there are any wrong statements
written, for eg. Syntax error and all. So it saves you a lot of time. You can download, the IDEA from the JetBrains
website Just go for the Community edition which is
free for use. Download it and install it. Also to run Kotlin programs, you need a JDK(i.e.
Java Development Kit) which you can download at this url: Download and install the latest version of
the JDK. Both of these links are provided in the description
box below. Once, you’re done with the installation,
open the IntelliJ IDEA application on your system.
Mine was already installed, so this is how it looks. But you might have to choose a color
theme and choose plugins to install into the IDE. Just go through the default settings
and proceed as of now. Once you arrive at this window.
Click on Create new project. Choose Kotlin from the left panel and then
choose JVM | IDEA Click on Next
Give the Project name as: KotlinIntroduction. Choose a project location if you want or accept
the default. Project SDK, is the JDK version that you installed.
Leave the rest as it is and click on Finish. You’ll get to this window.
For the first time users, they’ll get some Tip of the Day window, which gives you tips
for using IntelliJ IDEA. Click on this arrow, next to the project name.
Right click on src folder and choose New ->Kotlin File/Class. Enter the name hello, select File and hit
Enter or Return key. By default the hello.kt file is opened up. Type the following code: If you’re a Java programmer you can easily
find out some similarities. Here, we’ve main() similar to Java where
we’ve added a single line of code to print Introduction to Kotlin. Then click on this green run button and you
can see the output in the console below. And there you’re. You are successfully done
with your first program in Kotlin Programming language. Thank you for watching. If you like this video
and want more such videos then please comment them down below. Don’t forget to check my other videos which
can be helpful to you.