mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-11 06:04:27 +08:00
Update Abecedarian.java
Removed unnecessary println and compacted it
This commit is contained in:
@ -10,12 +10,8 @@ class Abecedarian{
|
||||
|
||||
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
|
||||
|
||||
else{
|
||||
System.out.println("That is not abecedarian");
|
||||
return false;
|
||||
else{return false;}
|
||||
}
|
||||
|
||||
}
|
||||
System.out.println("Wow, that number is abecedarian");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user