string s ; for(迭代数组){s+=arr[i]+","} scanner sc = new scanner(system.in); s+=sc.next(); arr =str.split(",");