added ex O

This commit is contained in:
2024-12-17 13:40:19 +01:00
parent f2bb16ea85
commit 1255f304fc
4 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package exercises.ex_o;
public class NumberConsumer implements Runnable {
private LockedWithConditionsStack stack;
public NumberConsumer(LockedWithConditionsStack stack) {
this.stack = stack;
}
@Override
public void run() {
while (true) {
System.out.println("Pop from stack: " + stack.popFromStack());
}
}
}