面试题 01.01. 判定字符是否唯一

public boolean isUnique(String astr) {
        for(char x = 'a';x<='z';x++){
            if(!(astr.indexOf(x)==astr.lastIndexOf(x))){
                return false;
            }
        }
        return true;
    }

我的前方是万里征途,星辰大海!!
原文地址:https://www.cnblogs.com/taoyuxin/p/13544813.html