看板 [ java ]
討論串[問題] ArrayList
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓2(2推 0噓 0→)留言2則,0人參與, 最新作者ogamenewbie (._.)時間17年前 (2008/12/06 18:40), 編輯資訊
0
0
0
內容預覽:
Collections < >裡面放的必須是 Class,. 所以一般的數值型態必須要用 wrap class,. 像 int -> Integer, double -> Double.. 而不能直接 ArrayList<int> 這樣. 而 Collections 好像本來是不會做 autobox
(還有238個字)

推噓2(2推 0噓 3→)留言5則,0人參與, 最新作者howard666 (amin)時間17年前 (2008/12/05 21:13), 編輯資訊
0
0
0
內容預覽:
ArrayList<Double> List = new ArrayList<Double>();. List.add(1.0);. List.add(1.0);. System.out.println(List.get(0) = = List.get(1));. 結果印出來 答案是false,應該
首頁
上一頁
1
下一頁
尾頁