# EmptyStackException

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# EmptyStackException

```
open class EmptyStackException : RuntimeException
```

|---|---|---|---|----------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                          |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)                           ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/kotlin/java/lang/Exception.html#)                      |||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/kotlin/java/lang/RuntimeException.html#)     ||
|   |   |   | ↳ | [java.util.EmptyStackException](https://developer.android.com/reference/kotlin/java/util/EmptyStackException#) |

Thrown by methods in the`Stack`class to indicate that the stack is empty.

## Summary

|                                                                                             Public constructors                                                                                              ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [EmptyStackException](https://developer.android.com/reference/kotlin/java/util/EmptyStackException#EmptyStackException())`()` Constructs a new`EmptyStackException`with`null`as its error message string. |

## Public constructors

### EmptyStackException

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
EmptyStackException()
```

Constructs a new`EmptyStackException`with`null`as its error message string.