# safe cast

Published articles for safe cast.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Introduction to Interfaces

DevFeed: [Introduction to Interfaces](<https://devfeed.tech/articles/introduction-to-interfaces-25058.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-interfaces/>)

Author: author@typealias.com (Dave Leeds)

Published: 2022-09-12T00:00:00Z

Content type: article

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [interface](<https://devfeed.tech/topics/interface.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>), [superclass](<https://devfeed.tech/topics/superclass.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [cast](<https://devfeed.tech/tags/cast.md>), [classes](<https://devfeed.tech/tags/classes.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [programming](<https://devfeed.tech/tags/programming.md>), [safe-cast](<https://devfeed.tech/tags/safe-cast.md>), [smart-cast](<https://devfeed.tech/tags/smart-cast.md>), [unsafe-cast](<https://devfeed.tech/tags/unsafe-cast.md>)

### AI overview

The excerpt introduces Kotlin interfaces as a way for one object to have more than one type. It begins illustrating the topic with a farm scenario: Farmer Sue greets her chicken Henrietta, who clucks back; the excerpt ends before showing the Kotlin implementation.

### Source excerpt

Ever since Chapter 1, we've used a variety of built-in Kotlin types, like Int, String, and Boolean. Then in Chapter 4, we introduced our own custom types, like Circle, by writing classes. In this chapter, we'll dive into interfaces, which allow you to declare that a single object has more than one type at a time! Interfaces are a powerful language feature, and when used well, they can take your code to the next level.