import java.time.LocalTime
import java.time.format.DateTimeFormatter
object FormattedTimeApp {
def main(args: Array[String]): Unit = {
// Get the current time
val currentTime: LocalTime = LocalTime.now()
// Format the time as "HH:MM:SS"
val formatter: DateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss")
val formattedTime: String = currentTime.format(formatter)
println(s"Formatted Time: $formattedTime")
}
}
/*
run:
Formatted Time: 19:02:47
*/