• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

An Important update about System.out.print()

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I was quite amazed to find this.

You cannot write

anywhere in your code. Yes this is true. If we write such thing it will be flagged as an error. Nothing as defined above exist. In order to compile you must supply an argument (either some object or primitive data type) inside the print() method as a parameter.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Arka Guhathakurta wrote:You cannot write

If we write such thing it will be flagged as an error.


Which error, I think the error is self explanatory for its behavior

Arka Guhathakurta wrote:
Nothing as defined above exist. In order to compile you must supply an argument (either some object or primitive data type) inside the print() method as a parameter.


Good, you know the cause too
 
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

had you tried ?


print() is just like any other method, It throws error like any other method , simply beacuse there is no such method with takes empty arguments in PrintStream.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic