#/help
14 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @topaz dune! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
You can't sort a LinkedHashStuff. It maintains a well-defined order, sure, but it doesn't offer to reorder.
Okie, thank you!
I'll try to do this in a different way
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
You could create another one, created in the order you want it
The code I sent works for an ArrayList containing Map.Entry objects.
Hellllo!!
Something like this?:
ArrayList<HashMap> list = new ArrayList<>();
I'm sorry, I'm a beginer in this world
The signature of the map would be.
ArrayList<Map.Entry<Double Integer>>
However, I would use a TreeMap instead since that implementation of a Map is sorted by a comparator. You would have to switch your keys with your values however.
TreeMap<Integer,Double>
where the key is the power and the value is the coefficient.
You would create such a map like this:
TreeMap<Integer,Double> polynom = new TreeMap<>(Comparator.reverseOrder());
Thank you very much!
The last 1 hours I tried to create the same this in a different approach.
The other approach works for me, so I'll finish with it and then I'll move on to your approach in order to practice in a different way.
Anyway I need to read a bit about TreeMap so it's a good practice, thank you very very very much 🙏 ❤️
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.