 Hello everyone, today we are going to discuss topic Kotlin which is used for Android development. Let us see learning outcome of this topic. At the end of this session, students will be able to describe key features, advantages and applications of Kotlin programming language. Demonstrate Kotlin Hello World app. First of all, we will see introduction to Kotlin. Kotlin is a statically typed general purpose programming language developed by JetBrains that has built world class IDs like IntelliJ, IDEA, then PHPStorm, then AppCode, etc. It was first introduced by JetBrains in 2011 and a new language for the JVM that is Java Virtual Machine is there. Kotlin is object-oriented language and a better language than Java but still be fully interoperable with Java code. Kotlin is sponsored by Google announced as one of the official languages for Android development in 2017. This is all about Kotlin. Now we will see the key features of the Kotlin. The first feature is statically typed. Statically typed is a programming language, characteristic that means the type of every variable and expression is known at compile time. Although it is a statically typed language, it does not require you to explicitly specify the type of every variable you declare. This is very important features and very short features in the Kotlin language. The second feature is data classes. In Kotlin, there are data classes which lead to the generation of boilerplate like equals then hash code, then to string, getter, setter and much more. This is also important for the developer to set the data classes for the development. Third feature concise, it drastically reduces the extra code return in other object-oriented programming languages. Fourth safe, it provides the safety from most annoying and irritating null pointer exceptions by supporting nullability as part of your system. Every variable in Kotlin is non-null by default. Next interoperable with Java. Kotlin runs on Java virtual machine that is JVM, so it is totally interoperable with Java. We can easily access, use Java code from Kotlin and Kotlin code from Java. Functional and object-oriented capabilities. Kotlin has reached a set of many useful methods which includes higher order functions, lambda expressions, operator overloading, lazy evaluation, operator overloading and much more. Higher order function is a function which accepts the function as a parameter or returns a function or can do both. This is also very important feature in the Kotlin. Then smartcast, it explicitly typecast the immutable values and inserts the value in its safe cast automatically. Like we have typecasting, the same smartcast is available in the Kotlin which is very safe and which is very cast automatically. Comparation time, it has higher performance and faster comparison tune. Tool-friendly, it has excellent tooling support. Any of the Java IDs, IntelliJ, IDEA, Eclipse and AdWords Studio can be used for Kotlin. We can also be run Kotlin program from command line. There are two ways we can run command line also as well as we can run through and do studio also. Now, here are some examples which includes key features of the Kotlin. So just we have seen data classes, this is the code of the data class. Just I discussed data class that is there are data classes which lead to a total generation of the boilerplate like equals, hash code, two string, data setter and much more. In this program, a program class book which contains private string, title, then private author, then public string, here we have the setter and getter for this code in the Java code. But if I type in the Kotlin code, it will take only a data class book which contains variable title string and variable author. Kotlin means instead of writing this Java code, in Kotlin we write in one line of code. This is the very important feature in the Kotlin. Second, we talked about safe. It provides the safety from most annoying and irritating null point of exception. By supporting nullability as a part of its system, every variable in Kotlin is non-null by default. So here we define as a string as equal to hello greeks, it is a non-null declared. But when we declared s equal to null variable, then in that case it will give compile time error. So instead of that, string nullable str quotient model equal to null, this is the proper syntax. String nullable str quotient model equal to null, this is the proper syntax which compiler understands yes, the string nullable is a string which is a null and the user is going to assign different thing, so that it compiles successfully. Key features of Kotlin example, functional and object-oriented capabilities also we have discussed. What it contains? It is a higher order function, is a function which accepts function as a parameter or returns as a function or can do both. So here we have the code as a fun, my fun that is company string product string, it is here we have to declare a functioning in the form of array and then we have to pass a parameter as a string which is called as a jet beans Kotlin. So when we type this in the Kotlin language in one line, so it will consider this as a string and gives the output as jet beans develops Kotlin, jet beans develop Kotlin. Next we talked about smart cast. What it does? It explicitly type cast the immutable values and insert the value in its safe cast automatically. If we try to access on the labor type of string that is string question mark equal to byte, without safe cast it will generate a compiler error because it has to safe cast while displaying the string properly. So again the example is fun main, args array, variable string, string question mark equal to byte, if string not equal to null smart cast, smart cast print string length. In this case if I put string question mark equal to byte, then it will give as a compiler error. If I type string question mark equal to double code byte and again if I declare string not equal to null, then it will compile successfully. Then we go for advantages of Kotlin. What is the advantages of Kotlin is easy to learn that basic is most similar to Java. If anybody worked in Java then easily understand in no time. Kotlin is multi platform. Kotlin is supported by all ideas of Java. So you can write your program and execute them on any machine which supports JBM that is Java virtual machine. It is safer than Java. It allows using the Java frameworks and libraries in your new Kotlin projects by using advanced frameworks without any need to change the whole project in Java. Kotlin programming language including the compiler, libraries and all the coding is completely free and open source and available on GitHub. Here is the link for the GitHub is given, github.com or JetBeans or Kotlin. So we can go GitHub and check the libraries for all the tooling. Applications of Kotlin, you can use Kotlin to build Android applications. Kotlin can also compile to JavaScript and making it available for the front end. It is also designed to work well for web development and server side development. Here a simple demo of Hello World app in Kotlin. Let us develop a first Hello World application on Android Studio using Kotlin programming language. To develop Android application launch Android Studio first and select option start a new Android Studio project from this diagram. The next provide application name that is Hello World in my case and and check include Kotlin support and proceed. Click on the check box phone and tablet. Select API level for Android application and click next. From this diagram you select activity type and click next. So here Kotlin activity main.xml is created. Create an activity main.xml file in your folder and add this code. The code is given here. This code is related to activity main.xml which links to the Java code and displays the Hello World app. Then write a main activity dot kt. Kt is the extension of Kotlin like Java when we have main activity dot Java. The same in Kotlin we have main activity dot kt. Create main activity dot kt file in example app Java at point dot Hello World package at the this following code. And now run your app your device this output will display as a Hello World app in Kotlin. Pause the video for a while and give the answer of this question. Question is why is Kotlin interoperable with Java? The answer Kotlin is interoperable with Java because it uses JVM bytecode. Compiling it directly to bytecode helps to achieve faster compile time and makes no difference between Java and Kotlin for Java richer machine. Next question. Who is the developer of the Kotlin? Answer Kotlin was developed by JetBrains. These are the references for this topic. Thank you.