🍵 kotlin Error: Could not find or load main class _DefaultPackage

kotlin

fukurou

the supreme coder
ADMIN
place the main code inside a kotlin class file, not in a plain kt file

Kotlin:
class Tester {
}
fun main(args:Array<String>) {
    val age = 0 // implicit var declaration

    val isCompleted = false // explicit var declaration

    val num = 2 // constant takes less space than var

    println("test")
}

kotlin_bug.png
 
Top