Question: To answer this question, you may need to look up JOptionPanes showInputDialog and showConfirmDialog methods on Oracles Java API website. What does this program do?
To answer this question, you may need to look up JOptionPane’s showInputDialog and showConfirmDialog methods on Oracle’s Java API website. What does this program do?
![import javax.swing.JOption Pane; public class Uncertain Hello { public static void main(String[] args). {](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1704/9/6/2/657659faa61e62331704962655070.jpg)
import javax.swing.JOption Pane; public class Uncertain Hello { public static void main(String[] args). { String name; int response; do { name = JOption Pane.show InputDialog("What's your name? "); response = JOption Pane.showConfirmDialog(null, "Are you sure?"); JOption Pane. NO OPTION) if (response { == name = "there"; break; } 3 while (response == JOption Pane. CANCEL_OPTION); System.out.println("Hello" + name); 3 // end main } // end class UncertainHello
Step by Step Solution
3.47 Rating (167 Votes )
There are 3 Steps involved in it
The program uses Javas Swing library to interact with the user through a simple graphical user interface GUI Heres what the program does step by step ... View full answer
Get step-by-step solutions from verified subject matter experts
