Object Expressions, Declarations, and Inline Classes in Kotlin
Anonymous Objects with Object Expressions
Sometimes a slight modification of an existing class is needed, but without the overhead of creating an explicit named subclass. Kotlin addresses this through object expressions and object declarations.
An object expression creates an instance of an anonymous class that extends one or more supertypes:
p ...
Posted on Wed, 20 May 2026 03:25:00 +0000 by a-scripts.com