Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private class Abecadlo implements Runnable {
- static BlockingQueue<String> queue = new LinkedBlockingQueue();
- @Override
- public void run() {
- while (true) {
- String s = queue.take();
- // zrób coś z tym stringiem
- }
- }
- }
- public void setStringToShow(String stringToShow) {
- // coś tam
- Abecadlo.queue.put(stringToShow);
- }
Advertisement
Add Comment
Please, Sign In to add comment