Dining Philosophers solution based on priority in Java