|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcorejava.Console
public class Console
| Constructor Summary | |
|---|---|
Console()
|
|
| Method Summary | |
|---|---|
static void |
printPrompt(String prompt)
print a prompt on the console but don't print a newline |
static double |
readDouble(String prompt)
read a floating point number from the console. |
static int |
readInt(String prompt)
read an integer from the console. |
static String |
readString()
read a string from the console. |
static String |
readString(String prompt)
read a string from the console. |
static String |
readWord()
read a word from the console. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Console()
| Method Detail |
|---|
public static void printPrompt(String prompt)
prompt - the prompt string to displaypublic static String readString()
public static String readString(String prompt)
prompt - the prompt string to display
public static String readWord()
public static int readInt(String prompt)
prompt - the prompt string to display
NumberFormatException - if bad inputpublic static double readDouble(String prompt)
prompt - the prompt string to display
NumberFormatException - if bad input
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||