diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2024-08-11 10:47:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-11 10:47:33 +0100 |
| commit | 70fff8294eb39896d29ce5e4543af547e5de724c (patch) | |
| tree | 49c64e98cb2cd2fa1017bf63d9fab91c1290f776 /challenge-281/deadmarshal/java/Ch1.java | |
| parent | 763e9d078439adfe10b90a2731c34c761eb8a4e8 (diff) | |
| parent | 3f28cf46d7602c7dbb9f5236607e8c90967617d4 (diff) | |
| download | perlweeklychallenge-club-70fff8294eb39896d29ce5e4543af547e5de724c.tar.gz perlweeklychallenge-club-70fff8294eb39896d29ce5e4543af547e5de724c.tar.bz2 perlweeklychallenge-club-70fff8294eb39896d29ce5e4543af547e5de724c.zip | |
Merge pull request #10577 from deadmarshal/TWC281
TWC281
Diffstat (limited to 'challenge-281/deadmarshal/java/Ch1.java')
| -rw-r--r-- | challenge-281/deadmarshal/java/Ch1.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-281/deadmarshal/java/Ch1.java b/challenge-281/deadmarshal/java/Ch1.java new file mode 100644 index 0000000000..775eabbd2d --- /dev/null +++ b/challenge-281/deadmarshal/java/Ch1.java @@ -0,0 +1,13 @@ +public class Ch1 { + public static void main(String[] args) { + System.out.println(check_color("d3")); + System.out.println(check_color("g5")); + System.out.println(check_color("e6")); + } + + private static boolean check_color(String str) { + assert str.length() == 2; + return (str.charAt(0) + str.charAt(1)) % 2 == 1; + } +} + |
