The N-Queens problem implemented in Java