Code example for Stack

Methods: isEmpty, remove, size

0
	} 
 
	public void onBackButtonClicked(View view) {
		// AppConfig.answerTime[mCurrentQuestion] += (System.currentTimeMillis() 
		// - mTimeStart) / 1000f; 
		if (!mPassedQuestionIndices.isEmpty()) {
			mCurrentQuestion = mPassedQuestionIndices.remove(mPassedQuestionIndices.size() - 1);
			LoadQuestion(mCurrentQuestion);
		} else { 
			finish(); 
		} 
	} 
 
	public void onNextButtonClicked(View view) {
		// AppConfig.answerTime[mCurrentQuestion] += (System.currentTimeMillis() 
		// - mTimeStart) / 1000f; 
		String string = ((AdtAnswer) (((GridView) findViewById(R.id.AcQuizAnswers)).getAdapter())).getSelectedString();
		Log.d("123", "SELECTED = " + string);
		survey.setAnswer(mCurrentQuestion, string);
		// if(mCurrentQuestion >= answeredList.size()) 
		// answeredList.add(string);