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

  • SEARCH
  • Home
  • 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 9123243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:17:31+00:00 2026-06-17T06:17:31+00:00

I am trying to check what values are set in my VO. Below are

  • 0

I am trying to check what values are set in my VO.

Below are my clasess. I am getting
“The qualified case label MyEnum.UserType.DOCTORS must be replaced with the unqualified enum constant DOCTORS“

Please help me to identify what I am doing wrong here.

MyEnum.java

public MyEnum{
    private UserType userType;

    public UserType getUserType(){
        return userType;
    }

    public void setUserType(UserType userType){
        this.userType = userType;
    }

    public static enum UserType{
        DOCTORS("D"),
        PATIENT("P"),
        STAFF("S");
    }

}

EnumTest.java

public EnumTest {

    .....
    public void onGoBack(MyEnum myEnum) {

        switch(myEnum.getUserType())
        {
            case UserType.DOCTORS: // this shows "The qualified case label MyEnum.UserType.DOCTORS must be replaced with the unqualified enum constant DOCTORS"
                break;

        }
    }

}
  • 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-06-17T06:17:32+00:00Added an answer on June 17, 2026 at 6:17 am

    Since the compiler knows what type of enum you’re evaluating in the switch statement, you should drop the “qualified” portion as the error suggests (in your case: MyEnum.UserType.) and simply use the “unqualified” enum DOCTORS. See below:

    switch(myEnum.getUserType())
    {
        case DOCTORS: 
            break;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to emulate RapidCRC 's ability to check crc32 values within filenames on
I have the following code below that I'm trying to set a background color.
I'm trying to write a script where the unchecked values of a set of
here is the case guys, I'm trying to check username on onblur event with
I am trying to check if a value is in an array. If so,
I'm trying to check if a form input has any value (doesn't matter what
I am trying to check a series of buttons to see if they have
I'm trying to check if a file exists. If I use this: NSData *data
I am trying to check the following and all throw an out of bounds
I'm trying to check a checkbox, i've tried doing the following :- $('#someId').attr('checked','checked'); $('#someId').attr('checked',

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.