Construct an element with initial values.
Arrays in Java
Comments¶
- An array in Java is not an
Iterable
(due to design reasons). There is no super class of array andIterable
either in Java. If you want a method to support both array andIterable
as the parameter, you need to overload it (for both array andIterable
.) It is the same situation in Kotlin as Kotlin is mostly Java.