Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

printing

 
javazaatri wahabjava
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
what is the equivalent command in java to fprintln()in C.
thanks
 
Joe Ess
Bartender
Posts: 9279
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is object-oriented, rather than procedural, like C. Output is handled by streams (Java Tutorial) and formatting that output is either the responsability of the object being written via a toString() method or by helper objects like java.text.DateFormat. If you just want to write a line to the console, you can accomplish that by calling System.out.println("whatever");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic