public class Console extends Object
Constructor | Description |
---|---|
Console() |
Instantiates a new console.
|
Modifier and Type | Method | Description |
---|---|---|
File |
getFile() |
Gets the file.
|
String |
interpreter(String strEval) |
Evaluates the given string-expression and returns the result in
OutputForm . |
static void |
main(String[] args) |
The main method.
|
void |
printPrompt(PrintStream out,
String prompt) |
prints a prompt on the console but doesn't print a newline.
|
String |
readString(PrintStream out) |
read a string from the console.
|
String |
readString(PrintStream out,
String prompt) |
read a string from the console.
|
void |
setFile(File file) |
Sets the file.
|
public static void main(String[] args)
args
- the argumentspublic String interpreter(String strEval)
OutputForm
.strEval
- the str evalpublic void printPrompt(PrintStream out, String prompt)
out
- the outprompt
- the prompt string to displaypublic String readString(PrintStream out)
out
- Description of Parameterpublic String readString(PrintStream out, String prompt)
out
- Description of Parameterprompt
- the prompt string to displaypublic void setFile(File file)
file
- the new filepublic File getFile()
null
Copyright © 2018. All rights reserved.