static AtomicInteger count = new AtomicInteger(0); public void fun(List<String> strings){ for(String str : strings){ new Thread(()->{ char[]strChar = str.toCharArray(); for(char s : strChar){ if(s == 'a'){ count.incrementAndGet(); } } }).start(); } } 这么写呗
点赞 1

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务