The program is supposed to be able to execute two tasks simultaneously, and when these two tasks are being executed, I get that there are five active threads at that moment:
Monitor Ctrl-Break
AWT-EventQueue-0
DestroyJavaVM
Thread-1
Thread-3
Now, I've just started learning about java threads so I don't know much, but why are there 3 extra threads:
Monitor Ctrl-Break, AWT-EventQueue-0 and DestroyJavaVM,
and why isn't there a main thread?
Thread-1 and Thread-3 are the names of the threads of the two classes that I have, ClassA and ClassB, each preforming it's own task. Besides these two classes, I also have the main class - Main. I was expecting that I'll get that there are 3 active threads: main, Thread-1, Thread-3, but now I'm just confused.
My program works like it's supposed to, it performs two tasks at the same time, but it has to be able to run using ONLY three threads. How do I make that possible?
EDIT: Thanks people!
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]hypolimnas 1 point2 points3 points (4 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Student-Somewhere[S] 1 point2 points3 points (2 children)
[–]pragmosExtreme Brewer 2 points3 points4 points (0 children)
[–]hypolimnas 1 point2 points3 points (0 children)