TerminalIO
Class ScreenWriter

java.lang.Object
  |
  +--TerminalIO.ScreenWriter

public class ScreenWriter
extends java.lang.Object

The class ScreenWriter contains output methods for terminal I/O. Type-specific methods write Boolean, characters, integers, decimal numbers, strings, and objects to the terminal window. Examples:


   ScreenWriter writer = new ScreenWriter();
   writer.println("The cat sat on the mat.");

 


Constructor Summary
ScreenWriter()
           
 
Method Summary
 void print(boolean x)
          Prints 'true' or 'false'.
 void print(char x)
          Prints a character.
 void print(double x)
          Prints a double.
 void print(float x)
          Prints a float.
 void print(int x)
          Prints an integer.
 void print(long x)
          Prints a long.
 void print(java.lang.Object x)
          Prints the string representation of an object.
 void print(java.lang.String x)
          Prints a string.
 void println()
          Prints a new line.
 void println(boolean x)
          Prints a boolean followed by a new line.
 void println(char x)
          Prints a char followed by a new line.
 void println(double x)
          Prints a double followed by a new line.
 void println(float x)
          Prints a float followed by a new line.
 void println(int x)
          Prints an integer followed by a new line.
 void println(long x)
          Prints a long followed by a new line.
 void println(java.lang.Object x)
          Prints the string representation of an object followed by a new line.
 void println(java.lang.String x)
          Prints a string followed by a new line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreenWriter

public ScreenWriter()
Method Detail

print

public void print(boolean x)
Prints 'true' or 'false'.
Parameters:
x - the value to be printed.

print

public void print(char x)
Prints a character.
Parameters:
x - the value to be printed.

print

public void print(double x)
Prints a double.
Parameters:
x - the value to be printed.

print

public void print(float x)
Prints a float.
Parameters:
x - the value to be printed.

print

public void print(int x)
Prints an integer.
Parameters:
x - the value to be printed.

print

public void print(long x)
Prints a long.
Parameters:
x - the value to be printed.

print

public void print(java.lang.Object x)
Prints the string representation of an object.
Parameters:
x - the object to be printed.

print

public void print(java.lang.String x)
Prints a string.
Parameters:
x - the value to be printed.

println

public void println()
Prints a new line.

println

public void println(boolean x)
Prints a boolean followed by a new line.
Parameters:
x - the value to be printed.

println

public void println(char x)
Prints a char followed by a new line.
Parameters:
x - the value to be printed.

println

public void println(double x)
Prints a double followed by a new line.
Parameters:
x - the value to be printed.

println

public void println(float x)
Prints a float followed by a new line.
Parameters:
x - the value to be printed.

println

public void println(int x)
Prints an integer followed by a new line.
Parameters:
x - the value to be printed.

println

public void println(long x)
Prints a long followed by a new line.
Parameters:
x - the value to be printed.

println

public void println(java.lang.Object x)
Prints the string representation of an object followed by a new line.
Parameters:
x - the object to be printed.

println

public void println(java.lang.String x)
Prints a string followed by a new line.
Parameters:
x - the value to be printed.