filmov
tv
Java programming read input format output from console and from inputbox

Показать описание
Using dialog box for Input and Output
Using Console output windows to prompt for Input and output is very old-fashioned . And sometimes outdated. The more current way is to create a separate pop-up windows for each input.
Call the static showInputDialog method of the JOptionPane class, and supply the string that prompts the input from the user. For example:
Read an Integer
The above method returns a String object.
Read a number with decimal points.
The above method returns a String object.
Display on a messgebox
Using Console output windows to prompt for Input and output is very old-fashioned . And sometimes outdated. The more current way is to create a separate pop-up windows for each input.
Call the static showInputDialog method of the JOptionPane class, and supply the string that prompts the input from the user. For example:
Read an Integer
The above method returns a String object.
Read a number with decimal points.
The above method returns a String object.
Display on a messgebox