答:import java.util.*; class test { public static void main(String[] args) { String str1="001,002,003,004,006",str2 = "001,002,005"; String str=""; TreeSet ts = new TreeSet(); StringTokenizer st = new StringTokenizer(str1,","); while (st.hasMoreTokens()) { ts.add(st.nextToken()); } st = new StringTokenizer(str2,","); while (st.hasMoreTokens()) { ts.add(st.ne...[ 查看全文 ]