Skip to content

switch case error #63

@actor20170211030627

Description

@actor20170211030627
//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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions