@main def main(): Unit = // Int is a value type; String is a reference type val n: Int = 42 val s: String = "hi" // both are subtypes of Any val items: List[Any] = List(n, s) println(items)
Int is a value, String a reference