yusuf3000
03/20/2018, 8:33 AMenum Constants {
static let randomNumber: Int = 42
static let randomString = "42"
static let randomNonPrimitiveType = CustomClass(number: 42)
}
Then use it like so:
let constantsUse = Constants.randomNonPrimitiveType
What’s the best way to do this in Kotlin? Especially if the constant is a non primitive type.Andreas Sinz
03/20/2018, 8:36 AMyusuf3000
03/20/2018, 9:11 AM@JVMField
annotation for non primitive types. What’s my next best option?Andreas Sinz
03/20/2018, 9:26 AM