From d56697e55c75e54e88f643f507bbf886637ee0b4 Mon Sep 17 00:00:00 2001 From: sullis Date: Mon, 29 Jul 2024 09:38:04 -0700 Subject: [PATCH] print args --- .../io/github/sullis/helloworld/HelloWorldApp.scala | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/scala/io/github/sullis/helloworld/HelloWorldApp.scala b/src/main/scala/io/github/sullis/helloworld/HelloWorldApp.scala index 85483d7..c824e6b 100644 --- a/src/main/scala/io/github/sullis/helloworld/HelloWorldApp.scala +++ b/src/main/scala/io/github/sullis/helloworld/HelloWorldApp.scala @@ -1,8 +1,15 @@ package io.github.sullis.helloworld object HelloWorldApp extends App { - args.foreach { arg => - System.out.println(s"arg: ${arg}") - } + System.out.println("Hello world") + + printArgs() + + def printArgs(): Unit = { + + args.foreach { arg => + System.out.println(s"arg: ${arg}") + } + } }