使用正则表达式:
public boolean checkDifferent(String iniString) { return !iniString.matches(".*(.)(.*\1).*"); }