Package stdlib
Class StdOut
java.lang.Object
stdlib.StdOut
Standard output. This class provides methods for writing strings
and numbers to standard output.
For additional documentation, see Section 1.5 of Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static booleanprivate static PrintWriterprivate static final Locale -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose()Close standard output.static voidMakes it so that this class does nothing; handy for performance testing (Added by James Riely 2014/02/23.)static voidPrint a formatted string to standard output using the specified format string and arguments, and flush standard output.static voidPrint a formatted string to standard output using the specified locale, format string, and arguments, and flush standard output.static voidstatic voidprint()Flush standard output.static voidprint(boolean x) Print a boolean to standard output and flush standard output.static voidprint(byte x) Print a byte to standard output and flush standard output.static voidprint(char x) Print a char to standard output and flush standard output.static voidprint(double x) Print a double to standard output and flush standard output.static voidprint(float x) Print a float to standard output and flush standard output.static voidprint(int x) Print an int to standard output and flush standard output.static voidprint(long x) Print a long to standard output and flush standard output.static voidprint(short x) Print a short to standard output and flush standard output.static voidPrint an Object to standard output and flush standard output.static voidstatic voidstatic voidprintln()Terminate the current line by printing the line separator string.static voidprintln(boolean x) Print a boolean to standard output and then terminate the line.static voidprintln(byte x) Print a byte to standard output and then terminate the line.static voidprintln(char x) Print a char to standard output and then terminate the line.static voidprintln(double x) Print a double to standard output and then terminate the line.static voidprintln(float x) Print a float to standard output and then terminate the line.static voidprintln(int x) Print an int to standard output and then terminate the line.static voidprintln(long x) Print a long to standard output and then terminate the line.static voidprintln(short x) Print a short to standard output and then terminate the line.static voidPrint an object to standard output and then terminate the line.static voidRedirect to a file.
-
Field Details
-
charsetName
- See Also:
-
US_LOCALE
-
out
-
doNothing
-
-
Constructor Details
-
StdOut
private StdOut()
-
-
Method Details
-
close
Close standard output. -
println
Terminate the current line by printing the line separator string. -
println
Print an object to standard output and then terminate the line. -
println
Print a boolean to standard output and then terminate the line. -
println
Print a char to standard output and then terminate the line. -
println
Print a double to standard output and then terminate the line. -
println
Print a float to standard output and then terminate the line. -
println
Print an int to standard output and then terminate the line. -
println
Print a long to standard output and then terminate the line. -
println
Print a short to standard output and then terminate the line. -
println
Print a byte to standard output and then terminate the line. -
print
Flush standard output. -
print
Print an Object to standard output and flush standard output. -
print
Print a boolean to standard output and flush standard output. -
print
Print a char to standard output and flush standard output. -
print
Print a double to standard output and flush standard output. -
print
Print a float to standard output and flush standard output. -
print
Print an int to standard output and flush standard output. -
print
Print a long to standard output and flush standard output. -
print
Print a short to standard output and flush standard output. -
print
Print a byte to standard output and flush standard output. -
format
Print a formatted string to standard output using the specified format string and arguments, and flush standard output. -
printf
-
format
Print a formatted string to standard output using the specified locale, format string, and arguments, and flush standard output. -
printf
-
toFile
Redirect to a file. This is a hack to get programs to work easily in eclipse. (Added by James Riely 2012/01/12.) -
doNothing
Makes it so that this class does nothing; handy for performance testing (Added by James Riely 2014/02/23.) -
main
-