Skip to content

Commit

Permalink
Update PalindromeChecker.java
Browse files Browse the repository at this point in the history
  • Loading branch information
WonggEric authored Jan 30, 2025
1 parent 3c6db73 commit ebb363d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/PalindromeChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public boolean palindrome(String word) {
public String reverse(String str) {
String sNew = "";
for (int i = str.length() - 1; i >= 0; i--) {
result += str.charAt(i);
sNew += str.charAt(i);
}
return sNew;
}
Expand Down

0 comments on commit ebb363d

Please sign in to comment.