// http://codingbat.com/prob/p121596

public String altPairs(String str) {
  if (str.length() <= 2) {
    return str;
  }
  
  StringBuilder output = new StringBuilder();
  for (int i = 0; i < str.length(); i += 4) {
    output.append(str.charAt(i));
    if (i+1 < str.length()) {
      output.append(str.charAt(i+1));
    }
  }
  return output.toString();
}

Create altPairs.java