question: public NameSpace swap ( NameSpace newTop ) { NameSpace oldTop = ( NameSpace ) ( stack . elementAt ( 0 ) ) ; stack . setElementAt ( newTop , 0 ) ; return oldTop ; }
target:  Swap in the value as the new top of the stack and return the old value.