Skip to content

Instantly share code, notes, and snippets.

View labohkip81's full-sized avatar
😎
The wise are guided by reason

Laban labohkip81

😎
The wise are guided by reason
View GitHub Profile
@labohkip81
labohkip81 / main.kt
Created August 12, 2018 11:22
AdvancedThreadbareDemo created by Labohkip81 - https://repl.it/@Labohkip81/AdvancedThreadbareDemo
class Shape {
var numberOfSides = 0
fun simpleDescription() =
"A shape with $numberOfSides sides."
}
var shape = Shape()
shape.numberOfSides = 7
println(shape.simpleDescription())
@labohkip81
labohkip81 / main.kt
Created August 12, 2018 11:21
AdvancedThreadbareDemo created by Labohkip81 - https://repl.it/@Labohkip81/AdvancedThreadbareDemo
Empty file
@labohkip81
labohkip81 / Readln function.kt
Created August 11, 2018 16:02
This program expounds on the usage of the readln function in kotlin
//the readline function reads data input by the user into the keyboard
//this is similar to the scanner class in java.
fun main(args :Array<String>){
print("Enter a number")
val dataInput = readLine()
println()
print("Enter the second number")
val secondNumber = readLine()
println(dataInput)
@labohkip81
labohkip81 / Packt book projects_.idea_kotlinc.xml
Created August 8, 2018 17:48
Kotlin practice files.Codes are well commented thus can be used for revision
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Kotlin2JvmCompilerArguments">
<option name="jvmTarget" value="1.8" />
</component>
<component name="KotlinCommonCompilerArguments">
<option name="apiVersion" value="1.2" />
<option name="languageVersion" value="1.2" />
</component>
</project>