Introduction of kotlin with easy explanation:

Hello folks,Today’s world is developing very fast day by day in the field of technology so 80% of people  use the android phone.so definitely android demanding is increasing day to day.
So if you are an android developer and want to learn kotlin then you are in the right place.

What is kotlin ?

Kotlin is a general purpose ,open source and statically typed programming language.It uses the JVM so it can be used anywhere.It is generally used to develop the android application.

History of Kotlin

Kotlin was  developed by the jetbrains team.It was officially launched in 2016.

Feature of kotlin

1.Simple and easy:

 It is very simple and easy to learn as compared to java.

2.Concise

It reduces the writing more codes as compared to java.

3.Remove Null pointer exception

It removes the problem of null pointer exception

4.Open source

It is free of cost,anyone can use the kotlin without paying the money.

Advantage of kotlin

1.The main benefit of kotlin is that we have to write less number of codes.

2.It increase the quality of code.

3.It helps reduce the number of errors and bugs.

4.Kotlin is faster than java.

First kotlin program

//Here we will print the “Hello world” in kotlin.
fun main(args:Array<String>)
{
print(“Hello world”)
}

Output:

Hello world

Explanation of this program

1.//Here we will print the “Hello word” in kotlin.

// means comments the line ie  when we use this symbol before any word/sentence,compiler ignore it without giving error in  the program.

2.fun main(args:Array<String>){ }

This is the entry point of program.This is the mandatory function for every kotlin program.

3.print(“Hello world”)

print( ) function is used to display the message on the screen.

Comparison Kotlin  “Hello world” with java “Hello world”.

Java “Hello world” program

Class FirstProgram
{
Public static void main(String[ ] arg)
{
System.out.print(“Hello world”);
}
}

Output:

Hello world

Comparison:

1.To print “Hello world” we need to create class but it is necessary in kotlin because compiler creates automatically class.

2.To display the message,In java System.out.print( ) is used.But in kotlin print( ) is used.

sumankumar80

Hello Friends,I have written and developed this website because you can learn technology easily ,prepare for the placement and also for the any type of examination . By :Suman Kumar

Leave a Reply

Your email address will not be published. Required fields are marked *