Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in System.out.println()

Ken Sampson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I get an error when I try to do the following:


The compiler throws an error at the null part.

But when I check the error, it says

The method println(char[]) is ambiguous for the type PrintStream.

But I know that one of the signatures for println() is

System.out.println(Object x);

Then why can't this be right. Please help me.
balajee annamalai
Ranch Hand
Posts: 31
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic