Kotlin_main()方法和第一行:Hello World

code

package com.zjgsu.cxxu.memowithmindmap.util

object Test {
    /*use the @JvmStatic annotation*/
    @JvmStatic
    fun main(args: Array<String>) {
        println("Hello kotlin")
    }
}

/**
 * //in java:
 * public class TestJavaMain {
 *  //the main method:
    public static void main(String[] args) {
    System.out.println("hello java");
    }
}*/

with shortcut:quick write

psvmo:
(just like the psvm in java)
在这里插入图片描述
sout :this also works:(println())
在这里插入图片描述

posted @ 2024-04-25 17:14  xuchaoxin1375  阅读(27)  评论(0)    收藏  举报  来源