Nested and inner classes Classes can be nested in other classes: class Outer { private val bar: Int = 1 class Nested { fun foo() = 2 } } val demo = Outer.Nested().foo() // == 2 You can also use interfaces with nesting.
Nested and inner classes Classes can be nested in other classes: class Outer { private val bar: Int = 1 class Nested { fun foo() = 2 } } val demo = Outer.Nested().foo() // == 2 You can also use interfaces with nesting.

TechiSeek helps users find tech companies, products, services, solutions, experts, jobs, events, news, insights and more.
Terms of Service · Privacy Policy
© 2026 TechiSeek. All rights reserved.