Question: For both console mode and dialog based applications, we need to be able to get keyboard input and convert it to different types of values.
We also need to output values and explanatory text to the console or to a dialog box. Let's discuss how to use the Java IO classes such as the System and the Scanner classes to do console IO and the JOptionPane class to do dialog based IO.
Question: How do we convert string values from the keyboard to numeric values? How do we create output strings containing the values from our variables?
How to answer the problem? Any help would be appreciated.