Converting an ArrayList into a 2D Array

前端 未结 8 2230
北海茫月
北海茫月 2020-12-04 01:55

In Java how do you convert a ArrayList into a two dimensional array Object[][]?

From comments: I will describe you the problem with more details: an XML file inclu

8条回答
  •  忘掉有多难
    2020-12-04 02:42

    What you really want is to sort the ArrayList. To do that your Contacts class must implement a Comparator method.

    Check the next page for an example: http://www.java-examples.com/sort-java-arraylist-descending-order-using-comparator-example

提交回复
热议问题