Unisex Bathroom problem without semaphore

Could I ask you to evaluate my solution to Unisex Bathroom problem?

I tried to solve also a starvation issue and I think I succeeded.

Besides all what is the necessity of semaphores that the problem is related to? Why can’t size be simply compared to capacity as I did?

public class Bathroom {      private String inUseBy;      private int size;      private final int capacity;      private final Lock lock = new ReentrantLock();      private final Condition man = lock.newCondition();      private final Condition woman = lock.newCondition();      public Bathroom(final int capacity, final int size) {         this.capacity = capacity;         this.size = size;         inUseBy = "";     }      public void enter(final String sex) throws InterruptedException {         lock.lock();         try {             while (size == capacity || (size > 0 && !sex.equals(inUseBy))) {                 if (sex.equals("M")) {                     man.await();                 } else {                     woman.await();                 }             }             size++;         } finally {             lock.unlock();         }         System.out.println(sex + " using bathroom. Current employees in bathroom = " + size);         Thread.sleep(10000);         System.out.println(sex + " done using bathroom");         synchronized (this) {             size--;             if (size == 0) {                 if (sex.equals("M")) {                     woman.signalAll();                 } else {                     man.signalAll();                 }             } else {                 if (sex.equals("M")) {                     man.signal();                 } else {                     woman.signal();                 }             }             this.notifyAll();         }     }  } 

I appreciate all you thoughts you provide.

Thank you in advance!

lucineux ike in my bathroom and

lucineux ike in my bathroom and my laundry room it's the same room I don't know what I'm saying and I have a door shut so hopefully it's not too echoey I really freakin hope not that would be horrible so I have never filmed a video like this on my channel because I've never felt comfortable enough but know I'm finally like really happy with my skin and I just I'm so proud of the improvements that have been made I guess and how far I have come…

lucineux ike in my bathroom and

black marble bathroom supplier

Sun Stone Co.,LTD
 Sun Stone founded in 1996 year, a leading supplier of all kinds natural stone product. Our business has covered nearly 300 kinds different stone material as granite, marble, sandstone, basalt, slate, limestone etc

Our main products are as follows:
1) Granite,marble,slate,sandstone,quartzite,porphyre,limestone.
2) Interior: tiles,countertops,vanity tops,tub surrounds,doors,stairs,fireplace surrounds,mosaic.
3) Exterior:pavers,kerbstone,cubes,cobblestone,cut-to-size.
4) Semi-finished: random slabs,half slabs.
5) Stone carvings,monuments.
Our stone products have been constantly exported to Europe, North of America, Middle East, Japan and Australia etc countries all over the world.
Head office:
Xiamen Head Office: Unit AB, 9/F,Office Tower, Zhongxin Huiyang Building, No.59,North Hubin RD, 361012, Xiamen, China

Factories:
1) Huangtang Industrial Zone,Hui’an,Quanzhou,Fujian,China-tiles,countertops,tub surrounds,doors,stairs,etc.
2) Chongwu Town,Hui’an,Quanzhou,Fujian,China-stone carvings,monuments.
3) Guanqiao Town,Anxi,Quanzhou,Fujian,China-random slabs,half slabs,mosaic.
4) Jiaxiang,Jining City,Shandong province-blue limestone.
5) Xushui,Baoding City,Hebei province-slate,sandstone,quartzite,etc.
Our rich experience enable us to offer competitive price with quality product, also efficient delivery to satisfy our customers. Sunstone appreciates business partnership and long term cooperationblack marble bathroom supplier
website:http://www.china-sun-stone.com/
website2:http://www.china-sun-marble.com/