object Scala extends App { object StringUtilities { def upper(strings: String*) = strings.map(_.toUpperCase).mkString(" ") } println( StringUtilities.upper("A", "First", "Scala", "Program") ) }
- object Scala extends App {
- object StringUtilities {
def upper(strings: String*): Seq[String] = {strings.map(_.toUpperCase)}- def upper(strings: String*) = strings.map(_.toUpperCase).mkString(" ")
- }
println(StringUtilities.upper("A", "First", "Scala", "Program") mkString " ")- println( StringUtilities.upper("A", "First", "Scala", "Program") )
- }