[Music]
hey everyone welcome to the session
by Intellipaat I am sure most of us out
here are Android users right but have
you ever wondered about the official
programming language of Android well I'm
talking about kotlin guys many
companies like Google Pinterest uber and
other technology driven companies go
about using kotlin for their daily
needs and in this session we check out a
quick introduction to kotlin and go
about seeing what it offers to us as
developers guys and guys make sure to
subscribe to our intellipaat YouTube
channel so that you don't miss out on an
upcoming video and here is the agenda
for today will quickly start out by
finding out what kotlin is and second
we can check out the history of kotlin
third we'll check out all the features
that kotlin brings to the table and
next we go about checking all of the IDs
that are used to write code link code in
case and next I'll help you guys setup :
on a Windows environment and get you
started up on your first piece of code
and guess if you have any comment hit to
the comments section and let us know
we'll answer it at the earliest and guys
to get certified in trending
technologies make sure to head to intellipaat
website and check out all the
certification courses without further
ado let's begin the session
introduction to kotlin well guys what
is kotlin well to give you a quick
definition of kotlin is an
open-source general-purpose statically
typed programming language for using
with the Java Virtual Machine and
Android so this basically helps combine
object-oriented models and functional
programming models as well guys this is
the biggest advantage that kotlin
gives us as a programming language the
first key takeaway from the slide is
that it's open source
the second key takeaway is that it's a
general-purpose language which allows
both object-oriented and functional
programming features and it gives it to
the users as well and the third point is
it that statically type
well statically typed pretty much means
that you wouldn't have to give the data
types or match your variables with
respect to the data types every time you
go about using it guys so if you have a
variable you do not have to specify
every single time that it's an integer
or a float or double basically it's it's
as simple as that case so now coming to
the next point is pretty much you might
be wondering where cortland is actually
used well to give you the general exam
full of where kotlin can fit in into
this programming world we live in
while kotlin can be fit perfectly in
the server-side programming domain as
well it helps very much in the
client-side programming and most of all
it is majorly used in Android
development guys and you might come to
think about it these are very wide
fields that Dow which has been coated on
the screen but guys kotlin is used for
mobile server-side applications
client-side application development
basically in collaboration with
JavaScript or Java effects and then you
can also go about using a lot of data
science techniques alongside kotlin
and this is just one of the few
possibilities that we are naming it for
you guys
wield anyway check out the features in
depth in the coming slides case so on
that note you might be wondering who
uses kotlin right well guys again no
doubt kotlin is an amazing programming
language and the statistics prove the
same as well
well kotlin is one among the famous
languages used by many big technologies
companies out there guys well tech
people at Google uber Pinterest Evernote
urban clap and Trello and so many more
go about using kotlin for their daily
requirements case so this brings us to
the next point of the agenda so how did
kotlin combine well guys if you
actually take a look at the history of
kotlin it is actually very interesting
because giving you guys the fact you're
kotlin is actually considered as the
alternate to Java well if you guys did
not know for the last decade or so Java
was the biggest programming language the
most popular programming language to
have ever existed and then Python came
along the way and took over the throne
but Java was one among the big players
right so code him had to be amazing had
to be better than Java to be considered
as the alternate to Java right so when
it is on the same trend when it is on
the same legacy as Java then kotlin is
amazingness so coming to how kotlin
came by cotton pretty much originated at
this very famous company called as
JetBrains it was launched in the year
2011 and it has ever been open source
since 2011 guys so jetbrains is this
company which was basically behind the
IntelliJ IDEA and this particular or
tool or application was an extremely
popular
our ID way back from 2010 and it is
actually very popular these days as well
guys so the idea is pretty much called
as IntelliJ IDEA and it's amazingly easy
to work with so make sure you stick til
the end of the video where I'll actually
walk you through on setting up IntelliJ
and writing your first cut in Kyrgyz so
on that note the biggest point of
Cortland was actually when it made
history as the people at Google
announced that they would make Cortland
as an official language for Androids
just a couple of years ago guys so
pretty much in the world of Android
kirtland is the biggest name as a
programming language and again oh it can
be used alongside Java it can be used as
a replacement to Java and so much more
so what are the features of Cortland
guys there are many features of Cortland
but let me try to break it down into
simpler terms so that I can help you
grasp the concepts and keep them in your
memory guys and the first thing first
biggest feature which makes all
developers life easier which is pretty
much the interoperability with Java guys
so you can basically run your java code
on kirtland and you can run your go-to
in code on java and it is interoperable
on multiple levels such as that as well
and it is extremely versatile because it
gives you so many features well it gives
you so much access with respect to the
code and the concepts behind that the
possibilities are endless of what you
can come up with by making use of
Cortland guys and it is a very concise
language as well it is actually almost
similar to Java as I have mentioned and
it is a high level programming language
so you can go about understanding what
the code is doing even without having a
good knowledge of the court how cool is
that well if that doesn't excite you
enough let me tell you a very good point
which will the ease of use well guys
Cortland is actually extremely big Euler
friendly language to learn with grass
understand and do your projects in the
same it is also very similar to Java in
most aspects that we have already
discussing up now and it is very similar
to Java and many aspects as I've been
telling you guys and again the high
level syntax option which I just told
you guys it pretty much helps learners
understand clearly guys so high level
syntax is a very good thing for a
beginner or even an intermediate user
because at the
of the day if your code looks like your
generic English language the language
that you speak it just makes it easier
for you to grasp all the concepts
understand and implement them guys this
brings us to our next point
well Cortland is actually very efficient
because when you come to look at the
numbers the length of the code in
Cortland is 20% less than the length of
a Java code which does the exact same
thing well think about it if you had to
pretty much write hundred lines of code
in general you had you thought of
hundred lines of code
well Cortland can do it in 80 while Java
can do it in hundred something like that
yes well a small number like this might
not hold you back but think about
thousands of lines of code and saving
20% on that is a big achievement right
and again pushing the easy to learn card
because again for a fresher for a
beginner and an intermediate user
getting up to speed with the technology
is extremely important in terms of
developer efficiency in terms of putting
out good code and working our projects
case and then syntax is extremely
intuitive and lean so it is very concise
it is very pithy to a point where you
just have to type in what's exactly
required and you can get away with that
guys you wouldn't have to type in very
long syntaxes or programming language or
code snippets where you have to get a
small job done and this quickly brings
us to our next feature race which is
interoperability when you think about it
as I've already mentioned Java code can
run on Cortland and code link code can
run on Java so this will help you on a
very huge level in the intermediate to
advanced programming of phases of your
life because again at the end of the day
it keeps your developer productivity
extremely high you know there is nothing
redundant with the program that you're
working with and if you just know one
switching to the other is extremely
simple guys so if you know a lot of Java
then you pretty much know most of
Cortland how simple is that
and well if you know most of Cortland
again you can pretty much move all the
code to Chava as well and the biggest
advantages of caution is that you would
never need to switch codes because let's
say you want to run Java and code link
codes side by side and you can do just
that and this brings us to our next
interesting feature of Cortland which is
extensions case well think about it how
easy is it to add a feature to an exist
component in any programming language
right if you guys are intermediate to
advanced programmers you can relate to
this component and it is about medium to
high difficulty to add a feature to an
existing component well think again
because with respect to Cortland it
makes it very easy to add features to an
existing component guys well let me give
you an example think about an
object-oriented scenario or where you
have to talk to two classes at the same
time so instead of just creating a class
and then making sure you go to the class
you know imbibe all the methods from the
class and working about it
so you basically extend a class in
Cortland and you just avoid this
entirety of creating another class and
then pulling all the data from that and
guys if you think that was interesting
then think about this you can actually
work with code which you do not have
direct access to in the world of
Cortland as well pretty much you know
the data can be hidden using data hiding
methods or encapsulation and so much
more and eventually if you need access
to this data in another class or
something it is very easily accessible
to you or with the right programming
concepts and it is very easy to work
with the same as well guys so on that
note this brings us to actually checking
out what are the integrated development
environments that people use to write
Cortland code end guys well as I've
already mentioned you can go about using
IntelliJ IDEA from JetBrains it is an
amazing IDE and I'll just be showing you
how to work with it in a couple of
moments from now guys and then apart
from IntelliJ IDEA you have Android
studio your vim and you have sublime
text guys so pretty much my question to
you guys at this point of time is what
is your favorite IDE to go about working
with Cortland or any other programming
language in general guys so head to the
comments sections and do let me know
your view on this and again you can
pretty much go about using either of the
four or IDE is mentioned on the screen
and there are many more IDs as well this
is just the developer favorites that I
put out on your screen and a majority of
us would have used pretty much one of
these IDs in the past as well guys well
if you haven't do not worry I'll help
you set up the same so this brings us to
the point where we actually go about
downloading Cortland and setting it up
case well to do this since we're using
the IntelliJ IDEA IDE for this
particular example let's go ahead and
the same
so guys I just pretty much opened up the
JetBrains
website it's JetBrains dot-com / idea
because we're gonna be downloading the
IntelliJ IDEA ID so let me quickly hit
download and pretty much there are two
versions of this guys one is an ultimate
version and the other one is a community
version the ultimate ocean is a paid
version of the software but they
eventually give you a free trial to use
as well but then for all our purposes we
usually go about using the Community
Edition because it's free it has open
source and it has meant for Java virtual
machines and Android development guys so
let me quickly hit download on that and
it should be somewhere around five
hundred megabytes
so like I just mentioned it is about 580
megabytes and this should take or
somewhere around 40 45 seconds to
download guys so let's quickly resume as
soon as it downloads
so guys that just took about under a
minute to go about downloading the same
so let me quickly show you how we can
set up the IntelliJ IDEA ID and go about
working with the same guys
so you basically require our admin
access to go about the same and let me
quickly enter my administrator password
and we can begin with the installation
guys so this is the first screen that
you will be welcome to it as soon as you
start the setup and it's simple guys I
just hit next and then here you can
select the destination folder to which
you want to install I just let it be at
C Drive it's the default one C Drive
Program Files JetBrains I'll just hit
next and here you can pretty much go
about checking if your system is a
32-bit machine or a 64-bit machine you
can use either one it's fine but since I
have a 64-bit windows installed on a
64-bit machine I'll just check the
64-bit launcher option and then you
wouldn't have to check anything else kay
so all you have to do is hit next and
hit install so again this is gonna take
a couple of minutes to setup and install
and we can go about working with it as
soon as it's done
you
so guys that took about two minutes to
install just make sure you hit a run
IntelliJ IDEA Community Edition and you
can click on finish guys so it's gonna
set it up and start IntelliJ IDEA for us
and alongside that we can check out the
next step which is basically to run your
first Courtland program on IntelliJ IDEA
guys well let us quickly wait for it to
open up and then we can just enter a
first piece of Courtland code into
IntelliJ IDEA guys
well guys this is pretty much the first
screen there and Ellijay will open for
you you can go about setting your theme
and so much more but for the scope of
this video let's skip all the steps and
just make sure that it sets all the
default settings for us and we can work
with the same just for this video guys
and it's gonna take a minute to head to
the next screen guys so here we are this
is the welcome to our IntelliJ screen
and sure it's pretty simple guys let's
hit on create a new project to begin
with and it's gonna configure and create
a new project file for us so we're
basically working in Cortland so you
could pretty much select kirtland from
the left menu here and you can run it on
JVM guys so all you have to do is hit
next give it a name guys so we can go
about calling it demo and we have to hit
finish so this is as simple as it gets
to get your Cortland code running guys
so it's going to show you some tips on
the screen you can pretty much go about
watching each of these tips which will
basically help you get faster when
you're entering the code so let me hit
close for now and now let me maximize
this perfect so if I click on the left
tab which it says project and if I keep
going into our source files as you can
see we do not have any source file at
the moment our project is ready but our
source files are because there isn't any
to begin with right so let us quickly
create a source file where we can work
with Courtland guys so I'll just go to
so just right click on source or create
and click on new and then pretty much
click on a codel file or a class case
again we need to give a name for this
let me call it in Teddy part demo and
we're gonna create a file so let me hit
enter
and it's gonna open the file for us guys
so as you can already check out pretty
you watch the extension name for a
Cortlandt file is dot K T guys and there
is an update as well you can choose to
install the update when you're going
about working with the same so let us
begin with a very first simple program
which is pretty much the hello world
right so let's change it up a little let
me call the main function let's call
down so we're gonna be using this
particular syntax and again it's very
similar to Java rice so again we're
gonna go about printing it so println is
what we're gonna use instead of hello
world or let's try something else
let's try welcome in teleport learners
alright and this is as simple as it gets
to go about working with your first
piece of code guys I just hit the play
button I hit run in tele pod demo and
that's about it as you can shake on it
pretty much takes about 10 seconds or
two so to pretty much you know build
connect to the daemon compile your code
and to give you an output so you can go
about checking the output on the console
window out here guys such as welcome in
telepath learners and as ever you can
now go about changing this thing to
pretty much anything else that you want
so this will hold us basically for our
print code right so if you have to do
something else
so what we go about doing let's check
out how we can go about declaring a
variable right so we use pretty much
cube or Val and then we have to give the
a variable on name which you can pretty
much say no one which is number one
basically and then you can enter a value
to be say 500 and then we can have
another one let's perform a basic math
operation here guys so no two equal to
what do we want 200 let's say and then
let's say we want to do a mathematical
operation between them right so we can
go about using println and in essence
we're doing it directly out here I think
it's as simple as no one let's multiply
it no one into node two and as soon as I
hit run now it should basically give us
the output of the multiple basically it
should give us the product of 500 into
200 which is basically 1 lakh or 100
so you can go about performing any
mathematical operations just like this
so we can go aboard our subtracting and
running the same as well so we're going
to be given the output of 300 right now
as you can check out on the screen and
it is as simple as this case well we can
walk you through an entire use case on
Cortland if you guys want that now well
guys if you want to check out an
end-to-end project or written in
Cortland or step by step for you guys
make sure you head to the comments
section and do let us know if you guys
would be interested to check something
out like that and if you guys are
actually interested in that definitely
will come up with that at the earliest
guys so on that note we have reached the
end of this video and this brings us to
the end of this session guys if you have
any query set to the comment section
below and let us know we'll get back to
you at the earliest thank you for
watching