2020
10-10
10-10
java list随机抽取元素的案例
我就废话不多说了,大家还是直接看代码吧~/***从list中随机抽取元素**@paramlist*@paramn*@returnvoid*@throws*@Title:createRandomList*@Description:TODO*/privatestaticListcreateRandomList(Listlist,intn){//TODOAuto-generatedmethodstubMapmap=newHashMap();ListlistNew=newArrayList();if(list.size()<=n){returnlist;}else...
继续阅读 >