|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--RitIo
This class provides a method of reading information from standard input (stdin) while hiding all of the implementation details from the user. The class provides reads for integer, double, float, and string.
Constructor Summary | |
RitIo()
|
Method Summary | |
static double |
getDouble()
Reads a double from stdin using the prompt "Enter a double: " |
static double |
getDouble(java.lang.String prompt)
Reads a double from stdin using the prompt provided |
static float |
getFloat()
Reads a float from stdin using the prompt "Enter a float: " |
static float |
getFloat(java.lang.String prompt)
Reads a float from stdin using the prompt provided |
static int |
getInteger()
Reads an integer from stdin using the prompt "Enter an integer: " |
static int |
getInteger(java.lang.String prompt)
Reads an integer from stdin using the prompt provided |
static java.lang.String |
getString()
Reads a string from stdin using the prompt "Enter a string: " |
static java.lang.String |
getString(java.lang.String prompt)
Reads a string from stdin using the prompt provided |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RitIo()
Method Detail |
public static int getInteger()
public static int getInteger(java.lang.String prompt)
prompt
- The prompt to be used to get an integer
public static double getDouble()
public static double getDouble(java.lang.String prompt)
prompt
- The prompt to be used to get a double
public static float getFloat()
public static float getFloat(java.lang.String prompt)
prompt
- The prompt to be used to get a float
public static java.lang.String getString()
public static java.lang.String getString(java.lang.String prompt)
prompt
- The prompt to be used to get a string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |