Scala Stack push() method with example
In Scala Stack class, the push() method is utilized to add an element on the top of the stack. Method Definition: def push(elem: A): Stack.this.type Return Type: It adds an element on the top of the stack. Example #1: Scala // Scala program of push() // method import scala.collection.mutable.Stack /