update idea
This commit is contained in:
13
src/main/kotlin/InitAndSingleton.kt
Normal file
13
src/main/kotlin/InitAndSingleton.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
class InitAndSingleton{
|
||||
//初始化
|
||||
init{
|
||||
println("init")
|
||||
}
|
||||
//定义静态方法
|
||||
companion object{
|
||||
//方法实现
|
||||
fun function(){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/main/kotlin/Main.kt
Normal file
7
src/main/kotlin/Main.kt
Normal file
@@ -0,0 +1,7 @@
|
||||
fun main(args: Array<String>) {
|
||||
println("Hello World!")
|
||||
|
||||
// Try adding program arguments via Run/Debug configuration.
|
||||
// Learn more about running applications: https://www.jetbrains.com/help/idea/running-applications.html.
|
||||
println("Program arguments: ${args.joinToString()}")
|
||||
}
|
||||
Reference in New Issue
Block a user