Question: Like in this example, <https://www.duden.de/rechtschreibung/Regen_Niederschlag> , the words are sorted in the following way:
"regelwidrig, Regelwidrigkeit, Regelzeit, regen, Regen, Regenabflussrohr, Regenanlage, regenarm, Regenbö, Regenbogen..."
that is, it is a "more non-case-sensitive" sorting than Collections.Sort() automatically does. Lowercase words come before uppercase ones like "regen, Regen".

```
ArrayList<String> regen = new ArrayList<String>( );
for(String x : new String[]{"regelwidrig", "Regelwidrigkeit", "Regelzeit",
        "regen", "Regen", "Regenabflussrohr",
        "Regenanlage", "regenarm", "Regenbö", "Regenbogen"}) {
        regen.add(x);
}

```

Collections.sort(regen) response:

`[Regelwidrigkeit, Regelzeit, Regen, Regenabflussrohr, Regenanlage, Regenbogen, Regenbö,`  

`regelwidrig, regen, regenarm]// lowercase at the end`

I can implement a comparator for this, but I'd rather take one-liner of code to get this way of sorting. Such as:
Collections.SomeMethod(regen); or Collections.Sort(regen, some\_extra\_parameter);
But I haven't found after deep google search, unfortunately.

Answer: 
* You can use `String.CASE_INSENSITIVE_ORDER` to order strings in case-insensitive way.
* If you also at the same time want to farther specify order of elements which current comparator considers as equal (like `String.CASE_INSENSITIVE_ORDER` would do for `"Regen"` and `"regen"`) then you can use [`Comparator#thenComparing`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Comparator.html#thenComparing(java.util.Comparator)) method and pass to it Comparator which would sort those equal elements like you want.

	+ Assuming you would also want to order `"Regen", "regen"` as `"regen", "Regen"` (lower-case before upper-case) you can simply reverse their natural order with `Comparator.reverseOrder()`.

So your code can look like:

```
regen.sort(String.CASE_INSENSITIVE_ORDER.thenComparing(Comparator.reverseOrder()));

```

Demo:

```
ArrayList<String> regen = new ArrayList<String>(
        Arrays.asList("regelwidrig", "Regelwidrigkeit", "Regelzeit",
            "Regen", "regen", "Regenabflussrohr",
            "Regenanlage", "regenarm", "Regenbö", "Regenbogen")
);

regen.sort(String.CASE_INSENSITIVE_ORDER.thenComparing(Comparator.reverseOrder()));
System.out.println(regen);

```

Result: `[regelwidrig, Regelwidrigkeit, Regelzeit, regen, Regen, Regenabflussrohr, Regenanlage, regenarm, Regenbogen, Regenbö]`

(notice `"Regen"`, `"regen"` ware swapped)
The reason why strings are sorted the way they are naturally sorted is because the ASCII values for these characters have a lower value for *UPPERCASE* than for *lowercase*. In this case, all words starts with "R" and the ASCII value of uppercase "R" is 82 (52 hex), whereas lowercase "R" is 114 (72 hex). For that reason, `Regen` will precede `regen` when sorting in natural order (in Java).

So, using plain Java

```
public static void main(String[] args) {
    List<String> words = Arrays.asList(new String[]{"regelwidrig", "Regelwidrigkeit", "Regelzeit", "regen", "Regen", "Regenabflussrohr", "Regenanlage", "regenarm", "Regenbö", "Regenbogen"});
    Collections.sort(words);
    System.out.println(words);
}

```

Will output

```
[Regelwidrigkeit, Regelzeit, Regen, Regenabflussrohr, Regenanlage, Regenbogen, Regenbö, regelwidrig, regen, regenarm]

```

As you can see, all words starts with "R", but sorting puts all capitalized words ahead of ones that start with lowercase.

As @Pshemo indicated in his answer, you can (should) code your comparator account for case sensitivity and to reverse the order of lowercase vs uppercase as needed.