#Why is it showing error

1 messages · Page 1 of 1 (latest)

swift sedgeBOT
#

<@&987246399047479336> please have a look, thanks.

swift sedgeBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

mellow epoch
#

as said before this method does not work for primitives

jade remnant
#

then which one works?

#

is there any predefined method for descending sort?

molten plank
#

afaik the only way is to box into reference types ie Integer[]

molten plank
mellow epoch
#

but there are many ways to turn the ints to Integer

jade remnant
#

its changing as variable name

molten plank
mellow epoch
#

yeah...

molten plank
#

and also

#

it's int[] a, not int a[] now that I see it, the second one is a legacy from C that shouldn't be used

jade remnant
#

lol it worked

#

whats the difference between int and integer?

molten plank
#

it's a bit complex

jade remnant
molten plank
#

but to put simply, Collections.reverseOrder() is using something called generics, and generics are not supported by primitives

molten plank
#

well, I guess it's complex anyway 🤔

molten plank
mellow epoch
#

btw are they going to revamp/add some methods when this new generic update comes?

#

forgot the name

#

value types or smth

#

idk

molten plank
molten plank
mellow epoch
#

but will they remove the primitive specific methods then?

mellow epoch
#

yeah, backwards compatibility prob

molten plank
mellow epoch
#

was just stupid

#

mb

swift sedgeBOT
#

Closed the thread due to inactivity.

If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you 👍