/src/ThreadsSynchronization/Sender.java
https://bitbucket.org/Marin_Abaluta/exercitiul_15 · Java · 23 lines · 14 code · 9 blank · 0 comment · 0 complexity · 04ef62ca9e3f2225c1458fd510c10493 MD5 · raw file
- package ThreadsSynchronization;
- import com.sun.org.apache.xpath.internal.SourceTree;
- public class Sender {
- public void send(String message) {
- System.out.println("Sending " + message);
- try {
- Thread.sleep(1000);
- } catch (InterruptedException x) {
- System.out.println("Interrupted");
- }
- System.out.println(message);
- System.out.println("Sent");
- }
- }