Lottozahlen sortiert ausgeben

This commit is contained in:
Marc Koch 2020-04-09 09:17:05 +02:00
parent 5dd6d0d949
commit af39b64a9a
1 changed files with 1 additions and 0 deletions

View File

@ -45,6 +45,7 @@ public class Lottozahlen {
// Lottozahlen ausgeben
System.out.println();
System.out.print("Lottozahlen: ");
Collections.sort(lottozahlen);
for (int i = 0; i < lottozahlen.size(); i++) {
if (i < lottozahlen.size() - 1) {
System.out.print(lottozahlen.get(i) + ", ");