Part 01 / Topic 9 of 9
Putting it together: a welcome banner
Sections 4–8 together, in one program: a welcome banner, still only println and string literals.
fun main() {
println("========================================")
println(" Welcome to Kotlin Step by Step!")
println(" Learner: Rohan, Bengaluru")
println("========================================")
println("Today's plan: Hello.kt -> kotlinc -> java -jar")
}
$ kotlinc 04_welcome_banner.kt -include-runtime -d banner.jar
$ java -jar banner.jar
========================================
Welcome to Kotlin Step by Step!
Learner: Rohan, Bengaluru
========================================
Today's plan: Hello.kt -> kotlinc -> java -jar
No variables, no string repetition, no loops — every line is typed by hand on purpose. Part 2 gives
you val, string templates and .repeat() to build a banner like this without typing every = yourself.
Full program: examples/04_welcome_banner.kt.
Done here? The practice set for Part 1 — including the solutions — is on the part page.