/** *Pushesanitemontothetopofthisstack.Thishasexactly *thesameeffectas: *<blockquote><pre> *addElement(item)</pre></blockquote> * *@paramitemtheitemtobepushedontothisstack. *@returnthe{@codeitem}argument. *@seejava.util.Vector#addElement
*/ public E push(E item) {
addElement(item);
return item;
}
/** *Removestheobjectatthetopofthisstackandreturnsthat *objectasthevalueofthisfunction. * *@returnTheobjectatthetopofthisstack(thelastitem *ofthe{@codeVector}object). *@throwsEmptyStackExceptionifthisstackisempty.
*/ publicsynchronized E pop() {
E obj; int len = size();
obj = peek();
removeElementAt(len - 1);
return obj;
}
/** *Looksattheobjectatthetopofthisstackwithoutremovingit *fromthestack. * *@returntheobjectatthetopofthisstack(thelastitem *ofthe{@codeVector}object). *@throwsEmptyStackExceptionifthisstackisempty.
*/ publicsynchronized E peek() { int len = size();
/** use serialVersionUID from JDK 1.0.2 for interoperability */
@java.io.Serial privatestaticfinallong serialVersionUID = 1224463164541339165L;
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.