Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch case error #63

Open
actor20170211030627 opened this issue Mar 16, 2021 · 0 comments
Open

switch case error #63

actor20170211030627 opened this issue Mar 16, 2021 · 0 comments

Comments

@actor20170211030627
Copy link

actor20170211030627 commented Mar 16, 2021

//code example(代码示例):
public static final String PACKAGE_NAME = getAppPackageName();
public static final String ACTION_START = "abc_" + PACKAGE_NAME;
public void testSwitchCase(String action) {
    switch(action) {
        case ACTION_START://提示错误(Prompt Error): "Constant expression required" !!!!!
            break;
        default:
            break;
    }
}
public static String getAppPackageName() {
    return "com.github";
}

the picture blow: ↓
111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant