Kotlin Programs

This page contains a list of Kotlin programs and examples. You can practice these programs/examples to learn Kotlin in-depth.

Kotlin is an open-source statically typed programming language that targets the JVM, Android, JavaScript, and Native. It’s developed by JetBrains.

The Kotlin programs and examples on this page target the JVM (Java). You need Java installed to run these Kotlin programs/examples.

Kotlin Programs with Output

Kotlin: Hello World Program
Kotlin: Add Two Numbers
Kotlin: Subtract Two Numbers
Kotlin: Multiply Two Numbers
Kotlin: Divide Two Numbers
Kotlin: Calculate the Area of a Circle
Kotlin: Find Remainder of Two Numbers
Kotlin: Swap Two Numbers without a Temporary Variable
Kotlin: Calculate the Factorial of a Number
Kotlin: Print Fibonacci Series
Kotlin: Find the Largest of Three Numbers
Kotlin: Convert Celsius to Fahrenheit
Kotlin: Find the Roots of a Quadratic Equation
Kotlin: Check if a Given Year is a Leap Year
Kotlin: Print Prime Numbers in a Given Range
Kotlin: Print the Multiplication Table of a Number
Kotlin: Reverse a Number
Kotlin: Calculate the Power of a Number
Kotlin: Find the Sum of Natural Numbers
Kotlin: Calculate the Average of Numbers in an Array
Kotlin: Find the Maximum and Minimum Element in an Array
Kotlin: Find the Sum of Elements in an Array
Kotlin: Sort an Array in Ascending Order
Kotlin: Convert a List to an Array
Kotlin: Convert an Array to a List
Kotlin: Remove an Element from a List
Kotlin: Implement Stack using Arrays
Kotlin: Implement Queue using Arrays
Kotlin: Implement Linked List
Kotlin: Create a Simple Calculator

Kotlin Examples

Kotlin- Create Class Example
Kotlin - for Loop Examples
Kotlin - while and do-while loop example
Kotlin - if statement example
Kotlin - Nested if Statement Example
Kotlin - if-else Statement Example
Kotlin - if-else-if Statement Example
Kotlin - when Expression Example
Kotlin - break and continue Keyword Example
Kotlin - Nested Class Example
Kotlin - Inner Class Example
Kotlin - Inheritance Example
Kotlin - Abstract Class Example
Kotlin Interface Example
Kotlin Interfaces Inheritance Example
Kotlin - Enum Class Example
Kotlin - Enum Class Implementing Interfaces Example
Kotlin - Data Class Example
Kotlin - Array Initialization Example
Kotlin Array Basic Operations
Kotlin - Sorting Arrays Example
Kotlin - Two-Dimensional Arrays Example
Kotlin - Find Array Elements Example

Comments