Kotlin, Android App Development.
} } class Logger(printer: Printer) : Printer by printer // Delegation happens here! fun main() { val consolePrinter = ConsolePrinter() val logger = Logger(consolePrinter) logger.print("Hello, Kotlin Delegation!") } In this example, instead of Logger inheriting from ConsolePrinter, it delegates its