最新回答 / 慕移动9181930
可以这样写nbsp;加quot;#quot;可以表示返回顶端的意思nbsp;你可以查下锚点的用法亲,这个标签没有效果。后面用css样式可以给span标签设置css样式,就是相当与给“美国梦”这三个字来设置样式。
2018-04-16
Arrays.asList()是个坑,,,如果你的List只是用来遍历,就用Arrays.asList()吧!如果你的List还要添加或删除元素,还是乖乖地new一个java.util.ArrayList,然后一个一个的添加元素吧!详解:可以看
https://www.imooc.com/article/26091
https://www.imooc.com/article/26091
2018-04-16
有好多小伙伴洗牌是用随机数,像这样:do{t=random.nextInt(52);}while(y.contains(x.get(t)));y.add(x.get(t));
我感觉这样会大大增加复杂度,有时候这个循环都可能执行上万次,不信可以验证,我是这样洗牌的:for (int i=0;i<pokerList.size();i++) {Poker poker=pokerList.get(i);shuffleSet.add(poker);}for (Poker poker : shuffleSet) {newPokerList.add(poker);}用List和Set切换,Set是无序的
我感觉这样会大大增加复杂度,有时候这个循环都可能执行上万次,不信可以验证,我是这样洗牌的:for (int i=0;i<pokerList.size();i++) {Poker poker=pokerList.get(i);shuffleSet.add(poker);}for (Poker poker : shuffleSet) {newPokerList.add(poker);}用List和Set切换,Set是无序的
2018-04-15
https://www.imooc.com/article/26037
互相参考,欢迎批评指正
互相参考,欢迎批评指正
2018-04-15