Skip to content

Instantly share code, notes, and snippets.

@ajoz
ajoz / PsvmInKotlin.kt
Created June 5, 2017 09:19
public static void main function in Kotlin
class Foo {
// This will not work because its not a static method!
// You cannot annotate it with @JvmStatic (usable only
// in objects and companion objects)
// You have 4 options:
fun main(args: Array<String>) {
prinltn("This won't work as expected")
}
// this will clash with main above during compilation!