Why function call of setAnswerShownResult(true) becomes "error: invalid method declaration; return type required"?

Hi there,

In the following code of 3rd version of chap.5 - CheatActivity.java, Android Studio marks line setAnswerShownResult(true) - “error: invalid method declaration; return type required,missing method body…” and says function definition private void setAnswerShownResult(boolean isAnswerShown) is never used. What’s wrong here. Please see the more detail of these errors from the attached screen shoot.

protected void onCreate(Bundle savedInstanceState) {
    mAnswerIsTrue = getIntent().getBooleanExtra(EXTRA_ANSWER_IS_TRUE, false);
    mAnswerTextView = (TextView) findViewById(R.id.answer_text_view);

    mShowAnswerButton = (Button) findViewById(R.id.show_answer_button);
    mShowAnswerButton.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            if (mAnswerIsTrue) {
            } else {


private void setAnswerShownResult(boolean isAnswerShown){
        Intent data = new Intent();
        data.putExtra(EXTRA_ANSWER_SHOWN, isAnswerShown);
        setResult(RESULT_OK, data);