-
00小伙
Set<String> set = new HashSet<String>(Arrays.asList(arr));return set.contains(targetValue);刚好做面试题看到,希望可以帮到你,望采纳!
-
慕的地8582982
OUXAKAOFSDEDCVOILUUHNVDPKIRFMMSVLZFIIITANTUBXNRIFGWCOIJMOAFLITIQNNLOKNXQREUABKWMOXOVYOUKBHZDGQNTCJCAWZISWGKJADSUADDIHTSPCZVZPNDDLEVCPCZQZRHCOVCWCVFOXKRAABEAAXQQHSYYCBRRVVWPGFMCPHRKMGMFPFYLBBLOIUENDNFYBEYYBEEXFMDDXKKKQMSSUKDMCSWMJTTVROPFPPSFJVEQRBLLLHKKXSXTTVJHDKAKHKDZLFRUNAKVRXOYYYMBTUEDTTJJJMPMDXJTCFPVYURKBNYRSBSYURHDRKUHQHAGAHBXHQZQZVRUKXZBWLVSCYISXNDMKAWSVJNLHRZIKIQAWGBAAAWGFCSFOJPVFIEXNSCKMZBMIVFLGAEEYVYLUEUFZHNTZSISMPUSYQJCTXHSIHRUWBBEZTWMRSJSUEAQMCZOENFOKADGWNPAEVQTIEOKGCZJQGWZZRAKGTLPSIQNBYHXGYPQMCMCFUXMQLAKUQGORAQTRTBYOXGWFVLWMBRAQNKMWNZOFBXNPSVYMPXHKUWGCMVMTCYHPYBRGQULBJGQTVLNQTTPXCRCFOQHYPOPZCEXQQARXZVGQGPLOFVXUPSCXMWRBFWYOENWLVQAXBLOKUQSCEBKIFNEHXMUWZCUJFOSBXTWTPDFHEAWAPLCLFYIKAQNDZJLNWTCTWGJJZJMNQNCFIRNRVVQTCFOLUXOLZUQNDTWMZPMXUQZIZQMIFPBWMBRBKAPMCZWRODTDAPMKTSECBCSHGQXLVEAVYBXTPTLUQNQUXMCFPEXROHRKSOHNOPLCRODOQNJSOEUQMCSHQNWAOPKQASKBUJOFJABLXSTLTHSHQIQBPNI
-
coco49
楼上的方法可以用,或者是遍历数组,在遍历中使用
if(value.equals(arr[i]))来判断