{"action":"opened","issue":{"url":"https://api.github.com/repos/cidkd/JAVA/issues/1","repository_url":"https://api.github.com/repos/cidkd/JAVA","labels_url":"https://api.github.com/repos/cidkd/JAVA/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/cidkd/JAVA/issues/1/comments","events_url":"https://api.github.com/repos/cidkd/JAVA/issues/1/events","html_url":"https://github.com/cidkd/JAVA/issues/1","id":361561293,"node_id":"MDU6SXNzdWUzNjE1NjEyOTM=","number":1,"title":"Enumeration","user":{"login":"cidkd","id":43101641,"node_id":"MDQ6VXNlcjQzMTAxNjQx","avatar_url":"https://avatars2.githubusercontent.com/u/43101641?v=4","gravatar_id":"","url":"https://api.github.com/users/cidkd","html_url":"https://github.com/cidkd","followers_url":"https://api.github.com/users/cidkd/followers","following_url":"https://api.github.com/users/cidkd/following{/other_user}","gists_url":"https://api.github.com/users/cidkd/gists{/gist_id}","starred_url":"https://api.github.com/users/cidkd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cidkd/subscriptions","organizations_url":"https://api.github.com/users/cidkd/orgs","repos_url":"https://api.github.com/users/cidkd/repos","events_url":"https://api.github.com/users/cidkd/events{/privacy}","received_events_url":"https://api.github.com/users/cidkd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-19T03:14:02Z","updated_at":"2018-09-19T03:14:02Z","closed_at":null,"author_association":"OWNER","body":"枚举限制变量只能是预先设定好的值。使用枚举可以减少代码中的bug。\r\n\r\n`class FreshJuice{\r\n\tenum FreshJuiceSize{SMALL,MEDIUM,LARGE}\r\n\tFreshJuiceSize size;\r\n}\r\n\r\npublic class EnumerationJuice {\r\n\tpublic static void main(String []args) {\r\n\t\tFreshJuice juice = new FreshJuice();\r\n\t\tjuice.size = FreshJuice.FreshJuiceSize.MEDIUM;\r\n\t}`"}}
{"actor":{"display_login":"cidkd"}}