QUESTION IMAGE
Question
java code
yellow highlighted pwd;
pwd = joptionpane.showinputdialog(\enter password here\);
what is the missing data type in the java code provided?
- dialogbox
- string
- integer
Brief Explanations
In Java, the JOptionPane.showInputDialog() method returns a String (since it gets text input from the user, like a password here). The variable pwd is being assigned the result of this method, so its data type should be String. The option "dialogBox" is not a data type, and "Integer" is for whole numbers, which is not suitable for a password (text) input.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
B. String