mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-13 07:13:37 +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
|
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{
|
else{return false;}
|
||||||
System.out.println("That is not abecedarian");
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
System.out.println("Wow, that number is abecedarian");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user