We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 01f0361 + 3eddef9 commit ae1982eCopy full SHA for ae1982e
Misc/Abecedarian.java
@@ -0,0 +1,17 @@
1
+//Oskar Enmalm 29/9/17
2
+//An Abecadrian is a word where each letter is in alphabetical order
3
+
4
+class Abecedarian{
5
6
+ public static boolean isAbecedarian(String s){
7
+ int index = s.length() - 1;
8
9
+ for(int i =0; i <index; i++){
10
11
+ 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
12
13
+ else{return false;}
14
+ }
15
16
+ return true;
17
+}
0 commit comments