title: Programming Kotlin: Get to grips quickly with the best Java alternative
author:  Stephen Samuel 
description: Stephen Samuel Stephen Samuel is an accomplished developer with over 17 years of experience. He has worked with Java throughout his career, and in the past 5 years has focused on Scala. He has a passion for concurrency and Big Data technologies. Having spent the last few years in investment banking, he is currently working with Kotlin on a major Big Data ingestment project. Stephen is also active in the open source community, being the author of several high profile Scala and Kotlin libraries.
zlib_text: 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  KOTLIN AND C
  
  
  
  
  
  
  
  
  CODING
  
  
  
  
  
  
  
  
  EXAMPLES
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  PROGRAMMING FOR BEGINNERS
  
  
  
  
  
  
  
  
  J KING
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Basic Programs in Kotlin
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to perform arithmetic operations on two numbers
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Program to perform simple calculation
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Program to input numbers (integer, float, double) at run time
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to find largest of three numbers
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to swap two numbers
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to check whether a number is EVEN or ODD
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to print the Multiplication table
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Program to calculate and display student grades
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to convert temperature
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to display Fibonacci series
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to find area of circle
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Kotlin program to find area of Square
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Program to find area of a cylinder
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Ko