public synchronized boolean available(){
  return (Counter.availablePermits() > 0);
}

public synchronized boolean available ( ) { return ( Counter . availablePermits ( ) > 0 ) ; }
check if the semaphore is available or not
