Skip to content

Commit 3eddef9

Browse files
author
Oskar Enmalm
authored
Update Abecedarian.java
Removed unnecessary println and compacted it
1 parent e416be6 commit 3eddef9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Misc/Abecedarian.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ public static boolean isAbecedarian(String s){
1010

1111
if(s.charAt(i)<=s.charAt(i + 1)){} //Need to check if each letter for the whole word is less than the one before it
1212

13-
else{
14-
System.out.println("That is not abecedarian");
15-
return false;
13+
else{return false;}
1614
}
17-
1815
}
19-
System.out.println("Wow, that number is abecedarian");
2016
return true;
21-
}
17+
}

0 commit comments

Comments
 (0)