diff --git a/Banksystem/src/bank/Bank.java b/Banksystem/src/bank/Bank.java index ab64b94..d9ffc8e 100644 --- a/Banksystem/src/bank/Bank.java +++ b/Banksystem/src/bank/Bank.java @@ -44,8 +44,15 @@ public class Bank implements Serializable { return null; } - public ArrayList getKontenListe() { - return kontenliste; + //public ArrayList getKontenListe() { + public String[] getKontenListe() { + String kontendaten[] = new String[kontenliste.size()]; + + for (int i = 0; i < kontendaten.length; i++) { + kontendaten[i] = kontenliste.get(i).toString(); + } + + return kontendaten; } @Override diff --git a/Banksystem/src/bank/BankUI.java b/Banksystem/src/bank/BankUI.java index 0c3a5f0..03e8868 100644 --- a/Banksystem/src/bank/BankUI.java +++ b/Banksystem/src/bank/BankUI.java @@ -43,7 +43,7 @@ public class BankUI { private static void kontenListeanzeigen() { System.out.println("Hier sind die Konten: "); - for (Bankkonto b:bank.getKontenListe()) { + for (String b:bank.getKontenListe()) { System.out.println(b); } }