Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6650795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:56:05+00:00 2026-05-26T00:56:05+00:00

The Eclispe complier show me the error sntax on my else statements on my

  • 0

The Eclispe complier show me the error sntax on my else statements on my else if. Can anyone tell me what’s wrong? thanks!

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();

            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));
            }
        }
    });

They display error sntax on ‘else’ codes words, any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:56:06+00:00Added an answer on May 26, 2026 at 12:56 am

    You have a semicolon at the end of your if conditions:

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

    That ends the if statement, the { starts a fresh block, then else shows up out of nowhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Eclispe you can do Ctrl+Shift+R and a Window popup where you can write
Possible Duplicate: Java isEmpty() undefined for String? I copied my code from one java
In what circumstances can ClassCastException occur in the code below: import java.util.Arrays; import java.util.List;
The eclipse compiler refuses to compile the following code, stating that the field s
I wrote some code in c, using pthread (I configured the linker and compiler
I installed the playframework fbconnect module (version 0.6). I keep getting the following error.
I've wrote simple RMI code to learn how it works. While everything works fine
I have some Guice binding code using generics that compiles and functions fine from
I have some code which uses java.awt.Color. I want to translate my Java Code
I am trying to compile the example code of Mahout in Action in Eclipse.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.