public ArrayList<bankKonto> getKonto() {
return konto;
}
And when i am in my main i add bankKontoObject to make a new one. Then i add 3 to my bankKonto
when i try to do a for loop
for(bankKonto b; bankKontoObject.getKonto() {
System.out.println(b.getNummer() + " " +b.getSaldo());
}
for(bankKonto b : bankKontoObject.getKonto()) {
System.out.println(b.getNummer() + " " +b.getSaldo());
}
You missed a ')' at the end of 'getKonto' and the ';' should be a ':'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.