PPT-Folie
public int top ()
{ if (! this.is_empty())
return stack[top_pt-1] ;
else
{ System.err.println("top on empty stack!") ;
return -1 ; } }
public void pop ()
{ if (! this.is_empty())
top_pt-- ;
else
System.err.println("pop on empty stack!") ; }
Vorherige Folie
Nächste Folie
Zurück zur ersten Folie
Graphik-Version anzeigen