hey guys, is there a way to create a `const` list/...
# announcements
r
hey guys, is there a way to create a
const
list/array inside a companion object in kotlin?
🚫 1
i
You can't do it because only String and primitives can be compile time constants. You can only use simple
val
for lists/arrays/any other objects https://kotlinlang.org/docs/properties.html#compile-time-constants • It must be initialized with a value of type 
String
 or a primitive type
r
ah, okay thanks!
154 Views