The program compares records by a composite key and prints the sorted list as one line. You need to determine the exact stdout for the given input data and comparator behavior.
Scala 3.3.1 and JDK 21.0.2.scala-cli is not used; the solution runs as a regular program scala Main.scala.priority first in ascending order, then name in ascending order, then id in ascending order.4
2 beta 10
1 zeta 7
2 alpha 3
1 alpha 9
priority:name:id format.|.You need to determine exactly one line of stdout, with no extra spaces at the beginning or end, and with a trailing newline.
Output format:
1:alpha:9 | 1:zeta:7 | 2:alpha:3 | 2:beta:10
Main.scalastdinClick a line and write what it prints. Explanation is optional.