Question : Sorting in Java

Hi There,

I have a question on sorting.

I have a values in an array.

How to sort the array list based on order number (i.e details i [2] hold order numbers)?

Thanks!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
public class Order {
	
	private String name;
	private String type;
	private String order;
	
	public Order(String name,String type, String order){
		
		this.fileName = fileName;
		this.type = type;
		this.order = order;
	}


//All getter and setter methods.

} 

public class test{


List<Order> order = new ArrayList<Order>();


// I am adding all the values to order list
for(i = 0; i<length;i++){

order.add(new Order(details[i][0],details[i][1],details[i][2]));

}
}

Answer : Sorting in Java

If box 2 has access to all that then yes, software.  Maybe a reinstall of pcAnywhere would help, worth a shot anyway.
Random Solutions  
 
programming4us programming4us