feat: add advanced multithreading banking system skeleton
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package dev.banking.monitor;
|
||||
|
||||
import dev.banking.model.BankAccount;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class LiveMonitor {
|
||||
|
||||
public void update(
|
||||
Collection<BankAccount> accounts
|
||||
) {
|
||||
|
||||
for (BankAccount account : accounts) {
|
||||
|
||||
System.out.printf(
|
||||
"Account %d -> %d%n",
|
||||
account.getAccountId(),
|
||||
account.getBalance()
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user