public static String caesarianShift(String code, int shift) {
        char[] codeline = code.toCharArray();
        String result = "";
        for(int i = 0; i < codeline.length; i++) {
            if(codeline[i] >= 'a' && codeline[i] <= 'z') {
                if(codeline[i] + shift > 'z') codeline[i] = (char) (('a' - 1) + ((codeline[i] + shift) - 'z'));
                else codeline[i] = (char) (codeline[i] + shift);
            }
            else if(codeline[i] >= 'A' && codeline[i] <= 'Z') {
                if(codeline[i] + shift > 'Z') codeline[i] = (char) (('A' - 1) + ((codeline[i] + shift) - 'Z'));
                else codeline[i] = (char) (codeline[i] + shift);
            }
        }
        for(char element : codeline) {
            result += element;
        }
        return result.trim();
    }