Opening boxes

Report a typo

Create a type alias for InnerBox with an appropriate name corresponding to the created instance of this type in the main function. With the help of the method getSomethingFromBox(), output the number of items the object stores.

Write a program in Kotlin
class BiggerBox() {
class InnerBox<T>(var items: List<T>) {
fun getSomethingFromBox(): List<T> {
return items
}
}
}
typealias Box<T> = // write your code
fun main() {
var box = Box(listOf("lion", "rose"))
// print the number of items
}
___

Create a free account to access the full topic