android if else语句,Android:我的if else语句的编译错误

Eclispe编译器向我展示了我的else else语句上的错误sntax。谁能告诉我什么是错的?谢谢!

//click on one of chapters

list.setOnItemClickListener(new OnItemClickListener()

{

public void onItemClick(AdapterView> parent, View view, int position, long id)

{

String item = ((TextView)view).getText().toString();

Toast.makeText(getBaseContext(), item, Toast.LENGTH_LONG).show();

//Choose Chapter 1

if (item.equalsIgnoreCase("I. The Global Business Environment")); {

//go to chapter 1

startActivity(new Intent(ChaptersActivity.this, Chapter1Activity.class));

} else if (item.equalsIgnoreCase("II. Information Systems")); {

//go to chapter 2

startActivity(new Intent(ChaptersActivity.this, Chapter2Activity.class));

}

//Choose Chapter 3

else if (item.equalsIgnoreCase("III. Operations Management"));

{

//go to chapter 3

startActivity(new Intent(ChaptersActivity.this, Chapter3Activity.class));

}

//Choose Chapter 4

else if (item.equalsIgnoreCase("IV. Marketing"));

{

//go to chapter 4

startActivity(new Intent(ChaptersActivity.this, Chapter4Activity.class));

}

//Choose Chapter 5

else if (item.equalsIgnoreCase("V. Managing Human Capital"));

{

//go to chapter 5

startActivity(new Intent(ChaptersActivity.this, Chapter5Activity.class));

}

//Choose Chapter 6

else if (item.equalsIgnoreCase("VI. Preparing for the Examination"));

{

//go to chapter 6

startActivity(new Intent(ChaptersActivity.this, Chapter6Activity.class));

}

}

});他们显示错误sntax上的'其他'代码的话,任何想法?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值