Code example for Stack

Methods: removeAllElements

0
		histTitleStack.push(histTitle);
	} 
 
	public void resetStackSize() { 
		// called on local html page reload 
		histHtmlStack.removeAllElements();
		histTitleStack.removeAllElements();
		// pageTitle = null; 
	} 
 
	public int histStackSize() { 
		int histSize = histHtmlStack.size();
		return histSize;
	} 
 
	public String getHistory() {
		// load the 2nd to last page 
		String loadHtml = histHtmlStack.elementAt(histHtmlStack.size() - 2);
 
		// remove the current page 
		histHtmlStack.remove(histHtmlStack.size() - 1);