public class Console
extends java.lang.Object
Constructor and Description |
---|
Console() |
Modifier and Type | Method and Description |
---|---|
static void |
printPrompt(java.lang.String prompt)
Affiche un message a l'ecran sans fin de ligne
|
static double |
readDouble(java.lang.String prompt)
Lecture d'un double au clavier.
|
static int |
readInt(java.lang.String prompt)
Lecture d'un entier au clavier.
|
static java.lang.String |
readLine()
Lecture d'une chaine de caracteres au clavier.
|
static java.lang.String |
readLine(java.lang.String prompt)
Lecture d'une chaine de caracteres au clavier avec affichage d'un
prompt.
|
public static void printPrompt(java.lang.String prompt)
prompt
- Message a afficherpublic static java.lang.String readLine()
null
.public static java.lang.String readLine(java.lang.String prompt)
prompt
- Message a afficherprintPrompt(String)
,
readLine()
public static int readInt(java.lang.String prompt) throws java.lang.NumberFormatException
prompt
- Message a afficherjava.lang.NumberFormatException
- en cas d'erreurpublic static double readDouble(java.lang.String prompt) throws java.lang.NumberFormatException
prompt
- Message a afficherjava.lang.NumberFormatException
- en cas d'erreur