sigh.... here is some code that works...



Code:
Public class Test {
	Public static void main(String[] args) {
		System.out.println(Test.replaceStr("ThisABCisABCaABCtest", "ABC", " "));
	}

	Public static String replaceStr(String replace, String oldStr, String newStr) {
		While (replace.indexOf(oldStr) != -1) {
			replace = replace.substring(0, replace.indexOf(oldStr)) +
				newStr + replace.substring(replace.indexOf(oldStr) + oldStr.length());
		}
                return replace;
	}	
}