public static String reverse(String arg) {
        String tmp = null;
        if (arg.length() == 1) {
            return arg;
        } else {
            //extract the last char
            String lastChar = arg.substring(arg.length() - 1, arg.length());
            //extract the remaining chars
            String remainingString = arg.substring(0, arg.length() - 1);
            tmp = lastChar + reverse(remainingString);
            return tmp;
        }
    }