String test = "a,b|c,d|e,f";
如何使用.split方法进行分割字符串测试成为分割字符串
arrayList.get(0); // ans is a
arrayList.get(1); // ans is c
arrayList.get(2); // ans is e
arrayList1.get(0); // ans is b
arrayList1.get(1); // ans is d
arrayList1.get(2); // ans is f
你试过了什么?试图找到它们如何分布在两个名单上的模式...它不那么难 – Blub
我已经把它们分成(a,b)(c,d)(e,f) – user2511316
是的,现在你只需要再次拆分它们并将它们分配到两个列表中;) – Blub