Is there a way to understand documentation? Android Studio : I am simply trying to read documentation for TimeUnit in android studio. Here is the link

https://developer.android.com/reference/java/util/concurrent/TimeUnit.html

However I am slightly confused on how to read and understand it correctly.

For example, the following code will timeout in 50 milliseconds if the lock is not available:

     Lock lock = ...;
     if (lock.tryLock(50L, TimeUnit.MILLISECONDS)) ...

How do I initialize this? 

I have tried Lock lock = new Lock(); ---but this makes me implement all of the methods. I am simply trying to use it how the documentation describes it. 

Summary: I find documentation very ambiguous, and hard to understand without it being explained step by step. Is there a way to read and understand documentation in a simpler way that I can understand? I feel if I can learn to read the documentation better I will spend less time searching for answers all over the web. Thank you!