{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Kotlin\n", "\n", "[Kotlin](https://kotlinlang.org/) is a relative newcomer from [JetBrains](https://www.jetbrains.com/) and [Android](https://developer.android.com/kotlin/get-started.html). It's intended to an improved version of Java, including [Null Safety](https://kotlinlang.org/docs/reference/null-safety.html)." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "hello, 14\n" ] }, { "data": { "text/plain": [ "null" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fun double(x: Int): Int {\n", " return 2*x\n", "}\n", "\n", "println(\"hello, \" + double(3+4))" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "null" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "val plot = Plot()\n", "plot.display()" ] } ], "metadata": { "kernelspec": { "display_name": "Kotlin", "language": "kotlin", "name": "kotlin" }, "language_info": { "codemirror_mode": "kt", "file_extension": ".kt", "mimetype": "", "name": "Kotlin", "nbconverter_exporter": "", "version": "1.1.3" } }, "nbformat": 4, "nbformat_minor": 2 }