Articles → Java → Passing Null In Println Function In JavaPassing Null In Println Function In JavaIn this article, we will see what will happen if we pass null in println function in Java.Passing Null In Println When null will be passed in println, it will give following error - The method println(char[]) is ambiguous for the type PrintStream. Reason Println function have multiple signatures where we can pass a variable of type char[], string and object as parameter. The value null could be a character array, string or object. So, the compiler gets confused which method to call.Click to EnlargePosted By - Karan Gupta Posted On - Saturday, October 7, 2017 Query/Feedback Your Email Id Subject Query/Feedback Characters remaining 250
Query/Feedback