Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
calling java varargs method with single null argument using -'null,language-design,java,varargs'
calling java varargs method with single null argument ¬†using -'null,language-design,java,varargs'
If I have a vararg Java method foo(Object ...arg) and I call foo(null, null), I have both arg and arg as nulls. But if I call foo(null), arg itself is null. Why is this happening?
How should I call foo such that foo.length == 1 && foo == null is true?
Sep 7, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening