Hi I was wondering if there is a simple way to convert this array into ArrayList and then just sort it and reverse using collections.
Edit: I was able to solve the task by using for loop to pass the values from array to ArrayList and then the other way around. I found some solutions to convert but then I got ArrayList <int[]> and Collections. didn't work on it.
array to arrayList
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Anthony Chalk
2 April 2021, 10:11
Bit late, but check out this link:
https://stackoverflow.com/questions/1073919/how-to-convert-int-into-listinteger-in-java
0