Author: saqibkhan

  • Kotlin Data Type

    Data type (basic type) refers to type and size of data associated with variables and functions. Data type is used for declaration of memory location of variable which determines the features of data. In Kotlin, everything is an object, which means we can call member function and properties on any variable. Kotlin built in data type…

  • Kotlin Variable

    Variable refers to a memory location. It is used to store data. The data of variable can be changed and reused depending on condition or on information passed to the program. Variable Declaration Kotlin variable is declared using keyword var and val. The difference between var and val is specified later on this page. Here, variable language is…

  • 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…

  • Kotlin Environment Setup (Command line)

    Prerequisite Since Kotlin runs on JVM, it is necessary to install JDK and setup the JDK and JRE path in local system environment variable. To setup Kotlin for command line, you have to pre install JDK 1.6+ or above. To install JDK and set path of JDK and JRE refer link Set Path in Java . Setup…

  • What is Kotlin

    Kotlin is a general-purpose, statically typed, and open-source programming language. It runs on JVM and can be used anywhere Java is used today. It can be used to develop Android apps, server-side apps and much more. History of Kotlin Kotlin was developed by JetBrains team. A project was started in 2010 to develop the language and officially,…

  • Test Application Topic

    Start the Publisher Application In eclipse, right click on the Publisher.java source, and select Run As → Java Application. Publisher application will start running and you’ll see the output as follows − Start the Subscriber Application In eclipse, right click on the Subscriber.java source, and select Run As → Java Application. Subscriber application will start…

  • Subscriber Application

    Now let’s create a subscriber application which will receive message from the RabbitMQ Topic. Create Project Using eclipse, select File → New → Maven Project. Tick the Create a simple project(skip archetype selection) and click Next. Enter the details, as shown below − Click on Finish button and a new project will be created. pom.xml Now update the content of pom.xml to…