Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Enums #45

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

Merged
merged 12 commits into from
Oct 2, 2023
Merged

Enums #45

merged 12 commits into from
Oct 2, 2023

Conversation

danthe1st
Copy link
Contributor

@danthe1st danthe1st commented Sep 28, 2023

Request issue

#40

I cannot self-assign to this issue since I don't have the necessary permissions.

Website section

Getting to Know the Language>Classes and Objects>Enums

Details

This PR adds an article on the topic of enums in Java.
It covers the following questions:

  • What are enums?
  • How can enums be used?
  • How do enums differ from normal classes?

Since the Classes and Objects section is not present in this repository, it might be necessary to change the directory name, id or similar. For that reason, I have named the file 01_enums.md for now. Should I change that to 09_enums.md?
Also, I am not sure on whether the id in the link for switch expressions is correct since that article seems to be missing from this repository as well.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 28, 2023
@danthe1st danthe1st marked this pull request as draft September 28, 2023 10:24
@danthe1st danthe1st changed the title Enumerations Enums Sep 28, 2023
@danthe1st danthe1st mentioned this pull request Sep 29, 2023
@carimura carimura requested review from ammbra and carimura September 29, 2023 15:26
@carimura carimura requested review from JosePaumard and wkorando and removed request for ammbra September 29, 2023 15:32
@wkorando
Copy link

Thank you for the contribution Dan! I made some comments on areas for improvement.

@danthe1st danthe1st marked this pull request as ready for review September 29, 2023 17:41
@danthe1st
Copy link
Contributor Author

danthe1st commented Sep 29, 2023

Can someone please check whether the file/directory names, slug/id and similar as well as the link to Switch Expressions are correct? I had to guess these since these articles/the Classes and objects section are missing in this repository.

@danthe1st
Copy link
Contributor Author

And I can also squash the changes to a single commit if wanted.

@wkorando
Copy link

And I can also squash the changes to a single commit if wanted.

Yea if you can do that at the end. That makes reviewing this addition later easier.

@danthe1st
Copy link
Contributor Author

danthe1st commented Sep 29, 2023

I have now made a few changes to the conclusion section in order to (hopefully) address @ammbra's feedback and make it easier to understand.
I am thinking about removing the last paragraph altogether as it might be a bit confusing and ambiguous as already mentioned.

@carimura carimura mentioned this pull request Sep 29, 2023
@carimura
Copy link
Member

Moving to PR #47 since I worked in a different branch. Sorry! Once comments are resolved here, we can update #47 and merge.

@danthe1st
Copy link
Contributor Author

I just want to mention that with this approach, I will not be able to squash it or do any changes in that branch so one of you would need to do this if needed.

@carimura
Copy link
Member

no problem you can work in your branch and I can update. I've changed the conclusion a bit, see if you like it.

@carimura
Copy link
Member

Can you merge the changes from main...danthe1st-enums into your branch so this PR is the active one?

@danthe1st
Copy link
Contributor Author

danthe1st commented Sep 30, 2023

I have merged it as well as changed another to a in the conclusion (They are a special type of class) since the article series doesn't mention other types of classes.

@carimura
Copy link
Member

carimura commented Oct 2, 2023

Thank you @danthe1st for your contribution and congrats on being the first approved community contribution! Once merged here we'll port it to the live site soon. Shoot me an email or Twitter DM and we'll arrange for a small thank you to be sent your way.

(thanks @wkorando and @ammbra for your reviews)

@carimura carimura merged commit 72668de into java:main Oct 2, 2023
@danthe1st danthe1st deleted the enums branch October 2, 2023 17:55
@carimura
Copy link
Member

carimura commented Nov 1, 2023

in case you missed it https://dev.java/learn/classes-objects/enums/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants