Provides a formatted prompt, then reads a single line of text from the console.
@param fmt A format string as described in
Format string syntax.
@param args Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by
The Java™ Virtual Machine Specification.
@throws IllegalFormatException If a format string contains an illegal syntax, a format specifier that is incompatible with the given arguments, insufficient arguments given the format string, or other illegal conditions. For specification of all possible formatting errors, see the
Details section of the formatter class specification.
@throws IOError If an I/O error occurs.
@return A string containing the line read from the console, notincluding any line-termination characters, or
null if an end of stream has been reached.