public class Console extends Object
| Constructor and Description | 
|---|
| Console() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | printPrompt(String prompt) | 
| 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. | 
public static void printPrompt(String prompt)
public static String readString()
public static String readString(String prompt)
prompt - the prompt string to displaypublic static String readWord()
public static int readInt(String prompt)
prompt - the prompt string to displayNumberFormatException - if bad inputpublic static double readDouble(String prompt)
prompt - the prompt string to displayNumberFormatException - if bad input