Here's my implementation. Comments?

Code:
public class CultureShock {
	
	public static String translate (String input) {
		if(input == null || input.length() < 3) {
			return input;
		}
		StringBuffer sb = new StringBuffer(input);
		
		char prev = ' ';
		int size = sb.length();
		for(int index = 0; index < size; ++index) {
			char cur = sb.charAt(index);
			if(prev == ' ' &&  size - index > 2) {
				if(cur == 'Z') {
					cur = sb.charAt(++index);
					if(cur == 'E') {
						cur = sb.charAt(++index);
						if(cur == 'E') {
							if(index == size -1 || sb.charAt(index + 1) == ' ') {
								sb.setCharAt(index,'D');
							}
						}
					}
				}
			}
			prev = cur;
		}
		return sb.toString();
	}

	public static void main(String[] args) {
		String var;
		if(args.length == 1) {
			var = args[0];
			System.out.println("In: '"+var+"' Result: '" + CultureShock.translate(var) + "'");
		}
		var = "";
		System.out.println("In: '"+var+"' Result: '" + CultureShock.translate(var) + "'");
		var = "THE TWENTY SIXTH LETTER OF THE ALPHABET IS ZEE";
		System.out.println("In: '"+var+"' Result: '" + CultureShock.translate(var) + "'");
		var = "ZEE";
		System.out.println("In: '"+var+"' Result: '" + CultureShock.translate(var) + "'");
		var = "ZEE ZEE ZED ZEDS ZEE ZEES";
		System.out.println("In: '"+var+"' Result: '" + CultureShock.translate(var) + "'");
	}
}