0

I'm making Spigot/Bukkit plugins for Minecraft, and I came across an ambiguous method call, which for one of the parameters I want to be null.

Is there any way I can specify which method I want to use or which object I'm saying is null?

Thanks.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Sulphate
  • 103
  • 9
  • 2
    Cast `null` to the desired object type, like `(String) null`. [DEMO](http://ideone.com/FVOpV9) – BackSlash Dec 19 '16 at 21:49
  • *Objects* can never be null. *Variables* can, but never objects. Please clarify your question, as I'm not sure if what you want to do is to cast your null to some type or not,... e.g., `foo((SomeType) null);` – Hovercraft Full Of Eels Dec 19 '16 at 21:50
  • Yeah, thanks. It's a Set, and casting it did the trick. Thanks! – Sulphate Dec 19 '16 at 22:03

0 Answers0