Lottozahlen sortiert ausgeben
This commit is contained in:
parent
5dd6d0d949
commit
af39b64a9a
|
|
@ -45,6 +45,7 @@ public class Lottozahlen {
|
||||||
// Lottozahlen ausgeben
|
// Lottozahlen ausgeben
|
||||||
System.out.println();
|
System.out.println();
|
||||||
System.out.print("Lottozahlen: ");
|
System.out.print("Lottozahlen: ");
|
||||||
|
Collections.sort(lottozahlen);
|
||||||
for (int i = 0; i < lottozahlen.size(); i++) {
|
for (int i = 0; i < lottozahlen.size(); i++) {
|
||||||
if (i < lottozahlen.size() - 1) {
|
if (i < lottozahlen.size() - 1) {
|
||||||
System.out.print(lottozahlen.get(i) + ", ");
|
System.out.print(lottozahlen.get(i) + ", ");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue