commit 0c2ba0586d4f9bcce7390b81dbd0a6ea3e212f26 Author: wandoubaba Date: Sat Aug 10 19:38:18 2024 +0800 HelloWorld, StringTemplates, Variables diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba45093 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +out +.idea diff --git a/io/kotlinstudy/tour/HelloWorld.kt b/io/kotlinstudy/tour/HelloWorld.kt new file mode 100644 index 0000000..d133a45 --- /dev/null +++ b/io/kotlinstudy/tour/HelloWorld.kt @@ -0,0 +1,5 @@ +package io.kotlinstudy.tour + +fun main() { + println("Hello, Kotlin") +} \ No newline at end of file diff --git a/io/kotlinstudy/tour/StringTemplates.kt b/io/kotlinstudy/tour/StringTemplates.kt new file mode 100644 index 0000000..94a6330 --- /dev/null +++ b/io/kotlinstudy/tour/StringTemplates.kt @@ -0,0 +1,9 @@ +package io.kotlinstudy.tour + +fun main() { + val customers = 10 + + println("There are $customers customers") + + println("There are ${customers + 1} customers") +} \ No newline at end of file diff --git a/io/kotlinstudy/tour/Variables.kt b/io/kotlinstudy/tour/Variables.kt new file mode 100644 index 0000000..af3e13c --- /dev/null +++ b/io/kotlinstudy/tour/Variables.kt @@ -0,0 +1,10 @@ +package io.kotlinstudy.tour + +fun main() { + val popcorn = 5 + val hotdog = 7 + var customers = 10 + + customers = 8 + println(customers) +} \ No newline at end of file