亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么android 重寫onClick()方法,總出錯!救救孩子吧!

為什么android 重寫onClick()方法,總出錯!救救孩子吧!

子衿沉夜 2021-08-13 11:11:34
【問題】報錯為什么語法錯誤.............multiple............(其在重寫onClick()方法前出現一個紅叉!)【代碼為】package org.game.sudoku;import android.app.Activity;import android.os.Bundle;import android.content.Intent;import android.view.View;import android.view.View.OnClickListener;import android.widget.Button;public class MySudokuActivity extends Activity implements OnClickListener{/** Called when the activity is first created. */@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);Button continueButton=(Button)findViewById(R.id.continue_button);continueButton.setOnClickListener(this);Button newGameButton=(Button)findViewById(R.id.new_game_button);newGameButton.setOnClickListener(this);Button aboutButton=(Button)findViewById(R.id.about_button);aboutButton.setOnClickListener(this);Button exitButton=(Button)findViewById(R.id.exit_button);exitButton.setOnClickListener(this);public void onClick(View v){..................................}}}【?。?!】希望各位大鳥說的詳細些,非常感謝!
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 350 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號