Welcome to Incels.is - Involuntary Celibate Forum

Welcome! This is a forum for involuntary celibates: people who lack a significant other. Are you lonely and wish you had someone in your life? You're not alone! Join our forum and talk to people just like you.

Serious why da fuck does the java queue

owly

owly

Banned
-
Joined
Oct 26, 2018
Posts
2,294
has to have the objects you put in it implement the comparable interface ?

I had this problem :
I have a queue object and it has to store special objects (lets call them Animal for example)
but when I added a 2nd object to the queue it errored the compiler :
"cannot be cast to java.lang.Comparable" :

why the fucking shit in the ass does adding an implements Comparable<Animal> to the, fucking jizzy JB, Animal class fix this

why couldn't those java fuckers write it in the document, fucking, tation the fuck the fuck.

what the fuck puke in the whore pussy, is going in the crap shit bloody tampon, queue class that I have to implement that comparable
nig, da fuck da fuck.

also, yeah this is why I prefer to use this site to talk about programming related shit.
also if you could translate this
https://stackoverflow.com/questions...tudent-cannot-be-cast-to-java-lang-comparable
to trash talk plz
 
you have to put the object into the oriented program bro.
i dont know shit
 
Flat550x550075f
 
get off your computer and go hunt mice tbh
 
Java is messy. But you are just rookie aren't you ? Just work harder. İt is not rocket science.

If you don't provide a custom Comparator, PriorityQueue uses natural ordering on the objects it holds. That is, it expects your objects to be Comparable to eachother. Your Student class doesn't seem to implement Comparable.

Do you know english ?
 
Last edited:
Java is messy. But you are just rookie aren't you ? Just work harder. İt is not rocket science.

If you don't provide a custom Comparator, PriorityQueue uses natural ordering on the objects it holds. That is, it expects your objects to be Comparable to eachother. Your Student class doesn't seem to implement Comparable.

Do you know english ?
It does now
 
Send the code you're writing.
Are you trying to compare the objects before storing them?
 
This ain't stackoverflow, faggot.
 

Similar threads

Destroyed lonely
Replies
20
Views
626
chiwara
chiwara
gymcellragefuel
Replies
14
Views
604
Emba
Emba
decembrist_kirillov
Replies
3
Views
222
wasted12years
wasted12years
E
Replies
18
Views
699
Namtriz912
Namtriz912
abajojo
Replies
4
Views
393
abajojo
abajojo

Users who are viewing this thread

shape1
shape2
shape3
shape4
shape5
shape6
Back
Top