Current Thread Method java
java, multithreading
Solution
The code that calls `currentThread` will be executing in one of the threads, not in all of them, so it can get that thread specifically.
Problem
So I am trying to work with threads for a game I am making. I am very new to the subject so I may not understand correctly. My question is how does the currentThread() method work in the Thread class of the java API. The API says "Returns a reference to the currently executing thread object.", but as far as I understand multiple threads run at the same time. How is it possible to return only one executing thread?