Skip to content

Commit

Permalink
Merge pull request #1498 from deiiviitdev/main
Browse files Browse the repository at this point in the history
#00 - Kotlin
  • Loading branch information
Roswell468 authored Feb 6, 2024
2 parents a43cc7e + 872a3fc commit a2c76ca
Showing 1 changed file with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// https://kotlinlang.org/

// One line comment

/*
Multiple line comment
*/

/**
* This is a documentation comment
*/

val drink = "Cafe"
const val dish = "Pizza"


/**
* Basic types
*/
// Integer types
val one: Int = 1
val threeBillions: Long = 3000000000
val oneByte: Byte = 1
val oneShort: Short = 1

// Floating point types
val pi: Float = 3.14f
val e: Double = 2.71828

// Unsigned types
val oneUByte: UByte = 1u
val oneUShort: UShort = 1u
val oneUInt: UInt = 1u
val oneULong: ULong = 1u

// Boolean type
val isTrue: Boolean = true

// Character type
val a: Char = 'a'

// String type
val hello: String = "Hello"

// Array type
val oneToFive: Array<Int> = arrayOf(1, 2, 3, 4, 5)
val oneToFive2: IntArray = intArrayOf(1, 2, 3, 4, 5)

/**
* Print "Hola, Kotlin" to the console
*/
fun main() {
println("Hola, Kotlin")
}

0 comments on commit a2c76ca

Please sign in to comment.