ReentrantLock - correct use or not?

Thanks, now the error is gone.

So i can use your way

or i can use my way without the import - only directly typing the path in the var-line? This would work too?