这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ezksd
Copy link
Contributor

@ezksd ezksd commented Aug 2, 2020

Enum is a special type in java, which doesn't like enum in other programming languages. It's not a primitive type, enum has the same construct of class. We also consider it a syntax sugar to define a special class. And enum definition located at subchapter of classes in java language specification too.

enum Coin {
    PENNY(1), NICKEL(5), DIME(10), QUARTER(25);
    Coin(int value) { this.value = value; }

    private final int value;
    public int value() { return value; }
}

@joshgoebel
Copy link
Member

Looks good. Please also update CHANGES.md

@joshgoebel joshgoebel merged commit a2a7db5 into highlightjs:master Aug 3, 2020
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

Successfully merging this pull request may close these issues.

3 participants