code: public static String swapCase(String input) {
          if (input == null || input.length() == 0) {
              return "";
          }
          StringBuilder resultBuilder = new StringBuilder();
          for (char ch : input.toCharArray()) {
              if (Character.isUpperCase(ch)) {
                  resultBuilder.append(Character.toLowerCase(ch));
              } else {
                  resultBuilder.append(Character.toUpperCase(ch));
              }
          }
          return resultBuilder.toString();
      }
docs: Returns a copy of the string in which all the case-based characters have had their case swapped.
  
  @param input Input string
  @return String with all the case swapped