Skip to content

New constants in place of large numbers - #234

Open
jb122334 wants to merge 1 commit into
phishman3579:masterfrom
jb122334:new_branch
Open

jb122334 wants to merge 1 commit into
phishman3579:masterfrom
jb122334:new_branch

Conversation

@jb122334

Copy link
Copy Markdown

By submitting this pull request I confirm I've read and complied with the below requirements.

  • [ x] I have read the Contribution guidelines and I am confident that my PR reflects them.
  • [ x] I have followed the coding guidelines for this project.
  • [ x] My code follows the skeleton code structure.
  • [ x] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.

These changes are useful because they say how the code is changed to use constants instead if large numbers.


private static final BigDecimal ZERO = new BigDecimal(0);
private static final BigDecimal TWO = new BigDecimal(2);
// The integers are defined as constants

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Here is the first comment.

private static final int THOUSAND = 1000;
private static final int HUNDRED = 100;
private static final int TEN = 10;
// The integers are constants

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Here is the next comment.

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.

1 participant