From 0c2ba0586d4f9bcce7390b81dbd0a6ea3e212f26 Mon Sep 17 00:00:00 2001 From: wandoubaba Date: Sat, 10 Aug 2024 19:38:18 +0800 Subject: [PATCH] HelloWorld, StringTemplates, Variables --- .gitignore | 2 ++ io/kotlinstudy/tour/HelloWorld.kt | 5 +++++ io/kotlinstudy/tour/StringTemplates.kt | 9 +++++++++ io/kotlinstudy/tour/Variables.kt | 10 ++++++++++ 4 files changed, 26 insertions(+) create mode 100644 .gitignore create mode 100644 io/kotlinstudy/tour/HelloWorld.kt create mode 100644 io/kotlinstudy/tour/StringTemplates.kt create mode 100644 io/kotlinstudy/tour/Variables.kt 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