My Blog

My WordPress Blog

My Blog

My WordPress Blog

Kotlin Tutorial

Kotlin Standard Input/Output

Kotlin standard input output operations are performed to flow byte stream from input device (keyboard) to main memory and from main memory to output device (screen). Kotlin Output Kotlin output operation is performed using the standard methods print() and println(). Let’s see an example: Output The methods print() and println() are internally call System.out.print() and System.out.println() respectively. Difference […]

Kotlin Operator

Operators are special characters which perform operation on operands (values or variable).There are various kind of operators available in Kotlin. Arithmetic Operator Arithmetic operators are used to perform basic mathematical operations such as addition (+), subtraction (-), multiplication (*), division (/) etc. Operator Description Expression Translate to + Addition a+b a.plus(b) – Subtraction a-b a.minus(b) * […]

Kotlin First Program Printing ‘HelloWorld’

Let’s create a Kotlin first example using IntelliJ IDEA IDE. Steps to Create First Example 1. Open IntelliJ IDEA and click on Create New Project’. 2. Select Java option, provide project SDK path and mark check on Kotlin/JVM frameworks. 3. Provide the project details in new frame and click ‘Finish’. 4. Create a new Kotlin file to run Kotlin […]

Kotlin Environment Setup (IDE)

Install JDK and Setup JDK path Since, Kotlin runs on JVM, it is necessary to install JDK and setup the JDK and JRE path in local system environment variable. Use this link https://www.javatpoint.com/how-to-set-path-in-java to setup JDK path. Install IDE for Kotlin There are various Java IDE available which supports Kotlin project development. We can choose these IDE […]

Kotlin First Program Concept

Let’s understand the concepts and keywords of Kotlin program ‘Hello World.kt’. 1. The first line of program defines a function called main(). In Kotlin, function is a group of statements that performs a group of tasks. Functions start with a keyword fun followed by function name (main in this case). The main () function takes an array of string (Array<String>) as […]

Kotlin Hello World Program in Command line.

To write Kotlin program, we can use any text editor like: Notepad++. Put the following code into any text file and save. Save the file with name hello.kt, .kt extension is used for Kotlin file. Compile Kotlin File Open command prompt and go to directory location where file is stored. Compile hello.kt file with following command. Run Kotlin File […]

Scroll to top