LastExceed
02/09/2022, 12:53 PMSam
02/09/2022, 12:56 PMvalues()
method on an enum isn't actually a member of its companion object. (If it was, you wouldn't be able to define a new companion object, because there would already be one).Sam
02/09/2022, 12:56 PMSam
02/09/2022, 12:59 PMvalues()
method in the companion object, but it won't override the built-in one. MyEnum.values()
will always resolve to the built-in method and will ignore the one in the companion object.Sam
02/09/2022, 1:01 PMLastExceed
02/09/2022, 1:34 PMSam
02/09/2022, 1:35 PMSam
02/09/2022, 1:36 PM