From dfec7fc5c513d71fddc2f5b9d8981dc5e7f1ccdc Mon Sep 17 00:00:00 2001 From: "b.lawal" Date: Sat, 20 Apr 2024 16:12:15 +0200 Subject: [PATCH] fix: group 30 --- src/Loops.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Loops.java b/src/Loops.java index 8bab3f9..ed39fef 100644 --- a/src/Loops.java +++ b/src/Loops.java @@ -62,14 +62,12 @@ public static void main(String[] args) throws InterruptedException { } for (String day : days){ -// BEWARE: There is a bug, the first value is not being capitalized as intended -// TODO: fix this bug System.out.println("Old value: " + day); System.out.println("New value: " + day.toLowerCase() - .replace(day.charAt(0), - String.valueOf(day.charAt(0)) - .toUpperCase().toCharArray()[0])); + .substring(0,1).toUpperCase()+day.substring(1).toLowerCase()); } + + for (int page : pages) { System.out.println(page); }