Kotlinv2.2.0
  • Solutions
  • Docs
  • Community
  • Teach
  • Play
  • Home
  • Get started
  • Take Kotlin tour
  • Kotlin overview
  • What's new in Kotlin
  • Kotlin evolution and roadmap
  • Basics
  • Concepts
  • Types
  • Control flow
  • Packages and imports
  • Classes and objects
  • Classes
  • Inheritance
  • Properties
  • Interfaces
  • Functional (SAM) interfaces
  • Visibility modifiers
  • Extensions
  • Data classes
  • Sealed classes and interfaces
  • Generics: in, out, where
  • Nested and inner classes
  • Enum classes
  • Inline value classes
  • Object declarations and expressions
  • Delegation
  • Delegated properties
  • Type aliases
  • Functions
  • Null safety
  • Equality
  • This expressions
  • Asynchronous programming techniques
  • Coroutines
  • Annotations
  • Destructuring declarations
  • Reflection
  • Data analysis
  • Platforms
  • Develop with Kotlin Multiplatform
  • Standard library
  • Official libraries
  • API reference
  • Language reference
  • Tools
  • Compiler and plugins
  • Learning materials
  • Early access preview (EAP)
  • Other resources

Uh Oh!

Something went wrong.
Don’t worry, it’s not you — it’s us.
Sorry about that!

  • Object declarations and expressions
  • Object declarations
  • Data objects
  • Companion objects
  • Object expressions
  • Create anonymous objects from scratch
  • Inherit anonymous objects from supertypes
  • Use anonymous objects as return and value types
  • Access variables from anonymous objects
  • Behavior difference between object declarations and expressions
Contributing to KotlinReleasesPress KitSecurityBlogIssue TrackerBrand AssetsCareersKotlin MerchOpt-Out
Kotlin™ is protected under the Kotlin Foundation and licensed under the Apache 2 license.
Supported and developed by JetBrains