Time:11-21
CodePudding user response:
List List1=Arrays. AsList (1.2, 2.3, 3,4.7, 5); List List2=Arrays. AsList (1,2,3.6, 4, 5); List1addAll (list2);
List List1=Arrays. AsList (1.2, 2.3, 3,4.7, 5); List List2=Arrays. AsList (1,2,3.6, 4, 5); List List3=new ArrayList<> (a); For (int I=0; i If (I & lt; Math. Min (list1. The size (), list2. The size ())) {List3. Add ((int) list1. Get (I) + (int) list2. Get (I)); } else {List3. Add ((list1. The size () & gt; List2. The size ())? List1. Get (I) : list2. Get (I)); } }
Page link:https//www.codepudding.com/Mobile/85571.html