Package stdlib
Class Out
java.lang.Object
stdlib.Out
This class provides methods for writing strings and numbers to
  various output streams, including standard output, file, and sockets.
  
For additional documentation, see Section 3.1 of Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Close the output stream.voidPrint a formatted string using the specified format string and arguments, and then flush the output stream.voidPrint a formatted string using the specified locale, format string and arguments, and then flush the output stream.static voidA test client.voidprint()Flush the output stream.voidprint(boolean x) Print an boolean and then flush the output stream.voidprint(byte x) Print a byte and then flush the output stream.voidprint(char x) Print an char and then flush the output stream.voidprint(double x) Print an double and then flush the output stream.voidprint(float x) Print a float and then flush the output stream.voidprint(int x) Print an int and then flush the output stream.voidprint(long x) Print a long and then flush the output stream.voidPrint an object and then flush the output stream.voidvoidvoidprintln()Terminate the line.voidprintln(boolean x) Print a boolean and then terminate the line.voidprintln(byte x) Print a byte and then terminate the line.voidprintln(char x) Print a char and then terminate the line.voidprintln(double x) Print an double and then terminate the line.voidprintln(float x) Print a float and then terminate the line.voidprintln(int x) Print an int and then terminate the line.voidprintln(long x) Print a long and then terminate the line.voidPrint an object and then terminate the line.
- 
Constructor Details- 
OutCreate an Out object using an OutputStream.
- 
Outpublic Out()Create an Out object using standard output.
- 
OutCreate an Out object using a Socket.
- 
OutCreate an Out object using a file specified by the given name.
 
- 
- 
Method Details- 
closeClose the output stream.
- 
printlnTerminate the line.
- 
printlnPrint an object and then terminate the line.
- 
printlnPrint a boolean and then terminate the line.
- 
printlnPrint a char and then terminate the line.
- 
printlnPrint an double and then terminate the line.
- 
printlnPrint a float and then terminate the line.
- 
printlnPrint an int and then terminate the line.
- 
printlnPrint a long and then terminate the line.
- 
printlnPrint a byte and then terminate the line.
- 
printFlush the output stream.
- 
printPrint an object and then flush the output stream.
- 
printPrint an boolean and then flush the output stream.
- 
printPrint an char and then flush the output stream.
- 
printPrint an double and then flush the output stream.
- 
printPrint a float and then flush the output stream.
- 
printPrint an int and then flush the output stream.
- 
printPrint a long and then flush the output stream.
- 
printPrint a byte and then flush the output stream.
- 
formatPrint a formatted string using the specified format string and arguments, and then flush the output stream.
- 
printf
- 
formatPrint a formatted string using the specified locale, format string and arguments, and then flush the output stream.
- 
printf
- 
mainA test client.
 
-