wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes alternative for system.out.println Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "alternative for system.out.println" Watch "alternative for system.out.println" New topic
Author

alternative for system.out.println

sarathchandra chandala
Greenhorn

Joined: Sep 06, 2007
Posts: 9
Is there a way to print a string in Java without using System.out.println ?
udhaya kanagaraj
Ranch Hand

Joined: Mar 31, 2005
Posts: 62
Hi sarathchandra chandala,

Do you what to print the string in the console? If that's the console we do not have any other option other than System.out.print

Thanks and Regards,
Udhaya
Manuel Leiria
Ranch Hand

Joined: Jul 13, 2007
Posts: 171
I'm not sure what you are trying to do but check the java.util.logging.Logger class


Manuel Leiria<br /> <br />--------------<br />Peace cannot be kept by force; it can only be achieved by understanding. <br /> Albert Einstein
Sandilya Garimella
Greenhorn

Joined: Apr 17, 2008
Posts: 3
Hi ,
you can use the System.out.printf method which is similar to the printf in C. This gives you the option for formatting your output onto the screen...
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19693
    
  20

System.console() may return a Console object which you can use to print to stdout as well (since Java 6).


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Adam J Smith
Greenhorn

Joined: Apr 23, 2008
Posts: 20
You could always create a simple method to do all of your console printing but I don't know if that is really a better solution. What is your reason for not using System.out.println?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: alternative for system.out.println