From 6c9055e3d374fa660b487d9f3d6a1451b370c2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Fern=C3=A1ndez=20Serrata?= <76864299+Rudxain@users.noreply.github.com> Date: Thu, 4 Apr 2024 06:27:21 -0400 Subject: [PATCH] Create Sisyphus.java --- main/Sisyphus.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 main/Sisyphus.java diff --git a/main/Sisyphus.java b/main/Sisyphus.java new file mode 100644 index 0000000..305f443 --- /dev/null +++ b/main/Sisyphus.java @@ -0,0 +1,14 @@ +public class Sisyphus { + public static final String HUMAN_NAME = "Sisyphus"; + + public static void main(String[] parameters) { + while (true) { + for (int index = 0; index <= HUMAN_NAME.length(); index++) { + System.out.println(HUMAN_NAME.substring(0, index)); + } + for (int index = HUMAN_NAME.length() - 1; index > 0; index--) { + System.out.println(HUMAN_NAME.substring(0, index)); + } + } + } +}