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

Adding Enum examples #61

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Adding Enum examples #61

wants to merge 22 commits into from

Conversation

Tawishi
Copy link

@Tawishi Tawishi commented Oct 3, 2020

Resolves #39

  • Add Enum class by taking example (directory named enum)
  • Add a few methods with explanation
  • Add iteration methods
  • Add readme in the directory

Copy link
Owner

@SiddharthaAnand SiddharthaAnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please go over the review comments. Added hacktoberfest tag here.

advanced_java/enum/MyClass1.java Outdated Show resolved Hide resolved
advanced_java/enum/MyClass2.java Outdated Show resolved Hide resolved
advanced_java/enum/MyClass3.java Outdated Show resolved Hide resolved
advanced_java/enum/MyClass4.java Outdated Show resolved Hide resolved
advanced_java/enum/MyClass4.java Outdated Show resolved Hide resolved
break;
case SUNDAY:
System.out.println("Complete deadlines.");
break;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move all the constants to a final variable and use it instead of hardcoding them in here.

Copy link
Author

@Tawishi Tawishi Oct 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the statements I am displaying?

@@ -0,0 +1,4 @@
public enum Day {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use other Enum in built methods as well and show their functionality here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please name a few?

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.

Add Enum examples
3 participants