max

fun <T : Comparable<T>> Array<out T>.max(): T?(source)
fun <T : Comparable<T>> Iterable<T>.max(): T?(source)

Deprecated

Use maxOrNull instead.

Replace with

this.maxOrNull()

Since Kotlin

1.0