-
-
Notifications
You must be signed in to change notification settings - Fork 947
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Java analyzer comments for Leap (#2316)
* Add comment about using built-in methods * Additional comments
- Loading branch information
1 parent
88a7012
commit 3233c67
Showing
3 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# avoid conditional logic | ||
|
||
Consider converting the `if`-statement(s) and/or ternary expressions into a single expression using the `&&` and `||` operators. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# no built-in methods | ||
|
||
Hey there, sneaky! | ||
The purpose of this exercise is to write the logic for checking leap years yourself. | ||
Solve it without using built-in methods from: | ||
|
||
- The `java.time` module; | ||
- The `java.util.GregorianCalendar` class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# use minimum number of checks | ||
|
||
Try reducing the number of checks to just three (hint: check the instructions). |