10000 Changed a few variables · RockLee444/Java-Algorithms@eca4a40 · GitHub
[go: up one dir, main page]

Skip to content

Commit eca4a40

Browse files
authored
Changed a few variables
1 parent 73a504c commit eca4a40

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

String Reversal/Palindrome.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ public static void main(String[] args){
88
word = sc.nextLine();
99
String[] wordArray = word.toUpperCase().split(" ");
1010
String noBlanksWord="";
11-
int numCaracteres=0;
1211
for(int i=0;i<wordArray.length;i++){
13-
numCaracteres+= wordArray[i 9090 ].length();
1412
noBlanksWord+=wordArray[i];
1513
}
1614

@@ -19,6 +17,7 @@ public static void main(String[] args){
1917
} else {
2018
System.out.println("The sentence: " + word + " IS NOT a palindrome.");
2119
}
20+
sc.close();
2221

2322
}
2423

@@ -48,4 +47,4 @@ public static boolean verifyWord(String word){
4847
}
4948
return isPalindrome;
5049
}
51-
}
50+
}

0 commit comments

Comments
 (0)
0