Post has attachment

Post has attachment

Post has attachment

Post has attachment

Post has attachment

Post has attachment

Post has shared content
Semaphore in Java with two explained examples
When a thread wants to access one of these shared resources, first, it must acquire the semaphore. If the internal counter of the semaphore is greater than 0, the semaphore decrements the counter and allows access to the shared resource. A counter bigger than 0 means there are free resources that can be used, so the thread can access and use one of them.
Otherwise, if the counter of the semaphore is 0, the semaphore puts the thread to sleep until the counter is greater than 0. A value of 0 in the counter means all the shared resources are used by other threads, so the thread that wants to use one of them must wait until one is free.
When the thread has finished the use of the shared resource, it must release the semaphore so that the other thread can access the shared resource. That operation increases the internal counter of the semaphore.
#programming   #java   #semaphore  

Post has shared content
Finding superclasses of an object in Java
In this article, we look into one of the mechanism of an Reflection to find about the super classes of any object in Java with example.  Reflection  enables what is commonly referred to as dynamic pro gramming in Java. Reflection in Java is accomplished  us...

Post has attachment

Post has attachment
Wait while more posts are being loaded