public String generateFourNumber() {
        String number = "";
        String newItem;
        for (int i = 0; i < 4; i++) {
            newItem = "" + generateRandomNumber();
            while (number.contains(newItem)) {
                newItem = "" + generateRandomNumber();
            }
            number += newItem;
        }
        return number;
    }