Code example for Stack

Methods: lastElementremove

0
	} 
	/** 
	 * 结束当前Activity(堆栈中最后一个压入的) 
	 */ 
	public void finishActivity(){ 
		Activity activity=activityStack.lastElement();
		finishActivity(activity);
	} 
	/** 
	 * 结束指定的Activity 
	 */ 
	public void finishActivity(Activity activity){
		if(activity!=null){
			activityStack.remove(activity);
			activity.finish();
			activity=null;
		} 
	} 
	/** 
	 * 结束指定类名的Activity 
Experience pair programming with AI  Get Codota for Java