Tutorials
References
Exercises
Videos
Menu
Log in
Create Website
Get Certified
Upgrade
HTML
CSS
JAVASCRIPT
SQL
PYTHON
JAVA
PHP
BOOTSTRAP
HOW TO
W3.CSS
C
C++
C#
REACT
R
JQUERY
DJANGO
TYPESCRIPT
NODEJS
MYSQL
Dark mode
Dark code
×
Tutorials
HTML and CSS
Learn HTML
Learn CSS
Learn RWD
Learn Bootstrap
Learn W3.CSS
Learn Colors
Learn Icons
Learn Graphics
Learn SVG
Learn Canvas
Learn How To
Learn Sass
Data Analytics
Learn AI
Learn Machine Learning
Learn Data Science
Learn NumPy
Learn Pandas
Learn SciPy
Learn Matplotlib
Learn Statistics
Learn Excel
XML Tutorials
Learn XML
Learn XML AJAX
Learn XML DOM
Learn XML DTD
Learn XML Schema
Learn XSLT
Learn XPath
Learn XQuery
JavaScript
Learn JavaScript
Learn jQuery
Learn React
Learn AngularJS
Learn JSON
Learn AJAX
Learn AppML
Learn W3.JS
Programming
Learn Python
Learn Java
Learn C
Learn C++
Learn C#
Learn R
Learn Kotlin
Learn Go
Learn Django
Learn TypeScript
Server Side
Learn SQL
Learn MySQL
Learn PHP
Learn ASP
Learn Node.js
Learn Raspberry Pi
Learn Git
Learn MongoDB
Learn AWS Cloud
Web Building
Create a Website
NEW
Where To Start
Web Templates
Web Statistics
Web Certificates
Web Development
Code Editor
Test Your Typing Speed
Play a Code Game
Cyber Security
Accessibility
Join our Newsletter
Data Analytics
Learn AI
Learn Machine Learning
Learn Data Science
Learn NumPy
Learn Pandas
Learn SciPy
Learn Matplotlib
Learn Statistics
Learn Excel
Learn Google Sheets
XML Tutorials
Learn XML
Learn XML AJAX
Learn XML DOM
Learn XML DTD
Learn XML Schema
Learn XSLT
Learn XPath
Learn XQuery
×
References
HTML
HTML Tag Reference
HTML Browser Support
HTML Event Reference
HTML Color Reference
HTML Attribute Reference
HTML Canvas Reference
HTML SVG Reference
Google Maps Reference
CSS
CSS Reference
CSS Browser Support
CSS Selector Reference
Bootstrap 3 Reference
Bootstrap 4 Reference
W3.CSS Reference
Icon Reference
Sass Reference
JavaScript
JavaScript Reference
HTML DOM Reference
jQuery Reference
AngularJS Reference
AppML Reference
W3.JS Reference
Programming
Python Reference
Java Reference
Server Side
SQL Reference
MySQL Reference
PHP Reference
ASP Reference
XML
XML DOM Reference
XML Http Reference
XSLT Reference
XML Schema Reference
Character Sets
HTML Character Sets
HTML ASCII
HTML ANSI
HTML Windows-1252
HTML ISO-8859-1
HTML Symbols
HTML UTF-8
×
Exercises and Quizzes
Exercises
HTML Exercises
CSS Exercises
JavaScript Exercises
Python Exercises
SQL Exercises
PHP Exercises
Java Exercises
C Exercises
C++ Exercises
C# Exercises
jQuery Exercises
React.js Exercises
MySQL Exercises
Bootstrap 5 Exercises
Bootstrap 4 Exercises
Bootstrap 3 Exercises
NumPy Exercises
Pandas Exercises
SciPy Exercises
TypeScript Exercises
Excel Exercises
R Exercises
Git Exercises
Kotlin Exercises
Go Exercises
MongoDB Exercises
Quizzes
HTML Quiz
CSS Quiz
JavaScript Quiz
Python Quiz
SQL Quiz
PHP Quiz
Java Quiz
C Quiz
C++ Quiz
C# Quiz
jQuery Quiz
React.js Quiz
MySQL Quiz
Bootstrap 5 Quiz
Bootstrap 4 Quiz
Bootstrap 3 Quiz
NumPy Quiz
Pandas Quiz
SciPy Quiz
TypeScript Quiz
XML Quiz
R Quiz
Git Quiz
Kotlin Quiz
Cyber Security Quiz
Accessibility Quiz
Courses
HTML Course
CSS Course
JavaScript Course
Front End Course
Python Course
SQL Course
PHP Course
Java Course
C++ Course
C# Course
jQuery Course
React.js Course
Bootstrap 4 Course
Bootstrap 3 Course
NumPy Course
Pandas Course
TypeScript Course
XML Course
R Course
Data Analytics Course
Cyber Security Course
Accessibility Course
Certificates
HTML Certificate
CSS Certificate
JavaScript Certificate
Front End Certificate
Python Certificate
SQL Certificate
PHP Certificate
Java Certificate
C++ Certificate
C# Certificate
jQuery Certificate
React.js Certificate
MySQL Certificate
Bootstrap 5 Certificate
Bootstrap 4 Certificate
Bootstrap 3 Certificate
TypeScript Certificate
XML Certificate
Excel Certificate
Data Science Certificate
Cyber Security Certificate
Accessibility Certificate
×
Tutorials
References
Exercises
Get Certified
Upgrade
Spaces
Videos
Shop
Kotlin
Tutorial
Kotlin HOME
Kotlin Intro
Kotlin Get Started
Kotlin Syntax
Kotlin Output
Kotlin Comments
Kotlin Variables
Kotlin Data Types
Kotlin Operators
Kotlin Strings
Kotlin Booleans
Kotlin If...Else
Kotlin When
Kotlin While Loop
Kotlin Break/Continue
Kotlin Arrays
Kotlin For Loop
Kotlin Ranges
Kotlin Functions
Kotlin Classes
Kotlin OOP
Kotlin Classes/Objects
Kotlin Constructors
Kotlin Class Functions
Kotlin Inheritance
Kotlin Examples
Kotlin Examples
Kotlin Exercises
Kotlin Quiz
Kotlin Compiler
Kotlin
Examples
❮ Previous
Next ❯
Kotlin Syntax and Output
Output some text
Output text on new lines
Do a simple calculation
Output some text with the print() function
Output Explained
Kotlin Comments
Single-line comment before a line of code
Single-line comment at the end of a line of code
Multi-line comment
Comments Explained
Kotlin Variables
Create two variables
Create two variables and specify the data type
Declare a variable without assigning the value
Create variable that cannot be changed/reassigned
Combine both text and a variable
Add a variable to another variable
Variables Explained
Kotlin Data Types
Create different variables of different types
Create different variables of different types explicitly
Create a Byte type variable
Create a Short type variable
Create an Int type variable
Create a Long type variable
Create a Float type variable
Create a Double type variable
Create a Boolean type variable
Create a Char type variable
Create a String type variable
Type conversion - Convert a data type to anoter type
Data Types Explained
Kotlin Operators
Addition operator
Subtraction operator
Multiplication operator
Division operator
Modulus operator
Increment operator
Decrement operator
Assignment operator
Equal operator
Not equal operator
Greater than operator
Less than operator
Greater than or equal to operator
Less than or equal to operator
Logical and operator
Logical or operator
Logical not operator
Operators Explained
Kotlin Strings
Create a string
Create a string and specify the type
Access a string
Find the length of a string
Compare two strings
Find a string in a string
Concatenate/merge two strings
Concatenate/merge two strings with the plus() function
Use quotes inside a string
Strings Explained
Kotlin Booleans
Create a boolean
Create a a boolean and specify the type
Compare two values
Booleans Explained
Kotlin If...Else
The if statement
The else statement
The else if statement
If..else expression
Short hand if..else
If...Else Explained
Kotlin When
The when expression
When Explained
Kotlin While Loop
Loop through a block of coding using a while loop
Loop through a block of coding using a do/while loop
While Loop Explained
Kotlin While Loop
Jump out of a loop with the break statement
Skip a value in a loop with the continue statement
Break/continue Explained
Kotlin Arrays
Create and access an array
Change an array element
Find the length/size of an array
Check if an element exists in an array
Loop thourh an array
Arrays Explained
Kotlin For Loops
Loop through an array of strings
Loop through an array of integers
For loop Explained
Kotlin Ranges
Create a range of characters
Create a range of numbers
Check if a value exists in a range
Using the break statement in a range
Using the continue statement in a range
Ranges Explained
Kotlin Functions
Create a function and call it
Call a function multiple times
Create a function with parameters
Using the return keyword in a function
Short hand syntax for return values
Functions Explained
Kotlin Classes
Create a class and an object of that class
Create multiple objects of one class
Create a constructor
Create a class function
Create a class function with parameters
Create a class that should inherit properties of a parent class (inheritance)
Classes Explained
❮ Previous
Next ❯
COLOR PICKER
Get certified
by completing
a
course today!
w
3
s
c
h
o
o
l
s
C
E
R
T
I
F
I
E
D
.
2
0
2
2
Get started