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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
close()
Close standard output.static void
Makes it so that this class does nothing; handy for performance testing (Added by James Riely 2014/02/23.)static void
Print a formatted string to standard output using the specified format string and arguments, and flush standard output.static void
Print a formatted string to standard output using the specified locale, format string, and arguments, and flush standard output.static void
static void
print()
Flush standard output.static void
print
(boolean x) Print a boolean to standard output and flush standard output.static void
print
(byte x) Print a byte to standard output and flush standard output.static void
print
(char x) Print a char to standard output and flush standard output.static void
print
(double x) Print a double to standard output and flush standard output.static void
print
(float x) Print a float to standard output and flush standard output.static void
print
(int x) Print an int to standard output and flush standard output.static void
print
(long x) Print a long to standard output and flush standard output.static void
print
(short x) Print a short to standard output and flush standard output.static void
Print an Object to standard output and flush standard output.static void
static void
static void
println()
Terminate the current line by printing the line separator string.static void
println
(boolean x) Print a boolean to standard output and then terminate the line.static void
println
(byte x) Print a byte to standard output and then terminate the line.static void
println
(char x) Print a char to standard output and then terminate the line.static void
println
(double x) Print a double to standard output and then terminate the line.static void
println
(float x) Print a float to standard output and then terminate the line.static void
println
(int x) Print an int to standard output and then terminate the line.static void
println
(long x) Print a long to standard output and then terminate the line.static void
println
(short x) Print a short to standard output and then terminate the line.static void
Print an object to standard output and then terminate the line.static void
Redirect to a file.
-
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
-