Question: Type in and run the following program. Then modify it properly to print Hello, name!, displaying the name that the user typed in. import javax.swing.JOptionPane;

Type in and run the following program. Then modify it properly to print Hello, name!, displaying the name that the user typed in.

import javax.swing.JOptionPane; public class Lab1bXX

{

public static void main(String[] args)

{

String name = JOptionPane.showInputDialog("What is your name?");

//add statements if needed

System.out.println(name);

//add statements if needed

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!