How can you use: JOptionsPane.showInputDialog to use switch for names as a string. Example below but it does not work: import javax.swing.JOptionPane; class JOptionsPane { String name =...


How can you use: JOptionsPane.showInputDialog to use switch for names as a string. Example below but it does not work:


import javax.swing.JOptionPane;


class JOptionsPane {


String name = JOptionsPane.showInputDialog(null, "Enter name");
Switch(name);
Case"Jeramy";
Case"James";
break;
Case"Carl";
break;



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here