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