peekOrNull

fun peekOrNull(): T?

Returns the topmost element in this Stack but does not pop it.

Return

Topmost element in this Stack or null if the Stack is empty.