ConcurrentProgrammingCourse.../src/exercises/ex_g/TestingSynchronizedStatements.java

11 lines
346 B
Java
Raw Normal View History

2024-12-10 13:46:16 +00:00
package exercises.ex_g;
2024-12-10 13:44:49 +00:00
public class TestingSynchronizedStatements {
public static void main(String[] args) {
// shared account object
Account account = new Account();
(new Thread(new BankEmployee("Mrs Fournier", account))).start();
(new Thread(new BankEmployee("Mr Schmidhalter", account))).start();
}
}