Hi,
I've an error sntax on my 'else' in this if-else statement. anyone know why? Pls advise. thank you.
source code:
//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();
//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));
}
I've an error sntax on my 'else' in this if-else statement. anyone know why? Pls advise. thank you.
source code:
//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();
//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));
}