#java hash

1 messages ยท Page 1 of 1 (latest)

twin wraithBOT
#

I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐Ÿ‘

#

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

twin wraithBOT
#

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.

pastel vigil
#

Why do you expect them to be equal?

nova elk
#

Thats just the test for this two Methods

pastel vigil
#

Why do you expect them to be equal?

twin wraithBOT
#

I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐Ÿ‘

pastel vigil
#

You still are not answering my questions

nova elk
#

im confused

#

i just tried to make it work, but im really a beginner

pastel vigil
#

Why do you expect them to be equal?

nova elk
halcyon crescent
#

which of the asserts is failing?

#

ur implementation is definitely wrong

#

ur equals allows for a delta difference

#

ur hashcode not

#

but equals and hashcode have to line up

pastel vigil
#

a equals shouldn't have a delta anyway ๐Ÿค”

twin wraithBOT
#

Detected code, here are some useful tools:

nova elk
#

this one is failling

#

idk what else i should chance so its working

halcyon crescent
#

that's not what i asked

#

that test has 4 asserts and i wanted to know which of them fails

halcyon crescent
#

like, the issue should be clear, no?

#

ur equals method would for example say that a number 2.00001 is the same as 2.00002

#

but ur hashcode considers them different and spits out a different hashcode

#

that's incorrect

#

they both have to have the same logic

#

either let both correctly use the delta or none

twin wraithBOT
#

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 ๐Ÿ‘