Skip to content

Instantly share code, notes, and snippets.

@jonathanwork
Created April 11, 2024 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanwork/1b5423b0e160571a8fbc18d57c7c84fb to your computer and use it in GitHub Desktop.
Save jonathanwork/1b5423b0e160571a8fbc18d57c7c84fb to your computer and use it in GitHub Desktop.
simple notes
/**
* You can edit, run, and share this code.
* play.kotlinlang.org
*/
fun typeface() {
val greet = "hello"
println(greet)
println(greet::class)
println(greet.javaClass)
}
fun nofluff() {
println("nofluff called... " )
throw RuntimeException("oops")
}
fun compute(n : Int) = n
fun portal() = println(compute(20))
fun main() {
portal()
println("not in a function, calling nofluff")
println("lemme take the nap ")
Thread.sleep(1000)
println("ohh that felt great")
try {
nofluff()
} catch (ex: Exception) {
val stackTrace = ex.getStackTrace()
println("catch")
println(stackTrace[0])
println(stackTrace[1])
}
println("Hello, world!!!")
typeface()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment