Method Summary |
void |
print(String value)
Displays the argument value, allowing for the possibility of more
output on the same line. |
void |
println()
Completes the output line. |
void |
println(String value)
Displays the value and then completes the line. |
boolean |
readBoolean()
Reads and returns a boolean value from the user, which must match
either true or false , ignoring case. |
boolean |
readBoolean(String prompt)
Prompts the user to enter a boolean value, which is then returned as
the value of this method. |
boolean |
readBoolean(String prompt,
String trueLabel,
String falseLabel)
Prompts the user to enter a value, which is interpreted as a boolean value
by matching it against the trueLabel and falseLabel
parameters. |
double |
readDouble()
Reads and returns a double-precision value from the user. |
double |
readDouble(double low,
double high)
Reads and returns a double-precision value from the user, which is
constrained to be within the specified inclusive range. |
double |
readDouble(String prompt)
Prompts the user to enter an double-precision number, which is then
returned as the value of this method. |
double |
readDouble(String prompt,
double low,
double high)
Prompts the user to enter an double-precision number, which is then returned
as the value of this method. |
int |
readInt()
Reads and returns an integer value from the user. |
int |
readInt(int low,
int high)
Reads and returns an integer value from the user, which is constrained to
be within the specified inclusive range. |
int |
readInt(String prompt)
Prompts the user to enter an integer, which is then returned as the value
of this method. |
int |
readInt(String prompt,
int low,
int high)
Prompts the user to enter an integer, which is then returned as the value
of this method. |
String |
readLine()
Reads and returns a line of input, without including the end-of-line
characters that terminate the input. |
String |
readLine(String prompt)
Prompts the user to enter a line of text, which is then returned
as the value of this method. |
void |
showErrorMessage(String msg)
Displays the error message. |