Answer the question
In order to leave comments, you need to log in
What does the compiler want from me in error: remove(Object,Object) in ConcurrentHashMap?
Good evening java gentlemen!
I am compiling a game assembly in java in eclipse. Everything compiles except for one util folder
error: remove(Object,Object) in ConcurrentHashMap cannot implement remove(Object,Object) in Map
public Object remove(Object key, Object value)
^
return type Object is not compatible with boolean
protected Object remove(Object key, Object value)
Answer the question
In order to leave comments, you need to log in
Googled the topic
https://mmo-dev.info/threads/%D0%9F%D0%BE%D0%BC%D0...
They wrote there
Do you compile in Java 8+?
public boolean remove(Object key, Object value)
...
The return type has changed there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question