Java implementation of the classic thread problem Dining Philosophers