Once again another thing I really can't understand is the way java "imports" the different classes and functions to a particular application.
I created a class that need to create a ReentrantLock object.
A ReentrantLock is owned by the thread last successfully locking, but not yet unlocking it.
A thread invoking lock will return, successfully acquiring the lock, when the lock is not owned by another thread.
That's the object that matches the closiest to the MUTEX concept. That's why I needed to use this Class.
When trying to compile I got this kinf of message well known:
symbol : class ReentrantLock
location: class consultservice.Main
ReentrantLock MyMutex=new ReentrantLock();
However I import java.util.* or java.util.concurrent.*
Is anybody can explain me how to use this Class ?
Thank you !!