Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
System.setOut() - Setting Standard Console Output to
How could Java classes direct program messages to the system console, but error messages, say to a file?
✍: FYIcenter
The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both connected to the system console. But you can change them to files as shown in the this example:
Stream st = new Stream(new FileOutputStream("output.txt")); System.setOut(st);
2007-03-03, 7544👍, 0💬
Popular Posts:
Why is there extra white space before or after tables? This is often caused by invalid HTML syntax. ...
When should the register modifier be used? Does it really help? The register modifier hints to the c...
What are the different storage classes in C? C has three types of storage: automatic, static and all...
Which bit wise operator is suitable for turning on a particular bit in a number? The bitwise OR oper...
How can we format data inside DataGrid? Use the DataFormatString property.