"Hello, Amigo!"

undefined
9
Task
Java Core, level 7, lesson 4
Locked
Synchronized notes
1. The Note class will be used by threads. So be sure that attempts to access the notes list lock notes, not this 2. Calls to System.out.println must not be synchronized, i.e. must not be in the synchronized block
undefined
5
Task
Java Core, level 7, lesson 4
Locked
Synchronized notes: part 2
The Note class will be used by threads. So be sure to synchronize all methods.
undefined
9
Task
Java Core, level 7, lesson 4
Locked
Time in the garden
1. Create a public void addFruit(int index, String fruit) method that adds the fruit parameter to the fruits list at position index. 2. Create a public void removeFruit(int index) method that removes the element at position index from fruits. 3. Create a public void addVegetable(int index, String ve
undefined
9
Task
Java Core, level 7, lesson 4
Locked
Synchronized president
We meet the singleton pattern again in synchronization in a static block. Create a synchronized block inside a static block inside the OurPresident class. Inside the synchronized block, initialize president.
undefined
5
Task
Java Core, level 7, lesson 4
Locked
IMF
Singleton pattern: synchronization in a method. The IMF class is the International Monetary Fund. Create a synchronized block inside the getFund method. Inside the synchronized block, initialize imf so that the getFund method always returns the same object.