import javax.swing.JOptionPane;
class selectStruct
{
public static void main(String args[])
{
int choice;
String str;
str = JOptionPane.showInputDialog(“Main Menu \n” +
“[1] Name \n” +
“[2] School \n” +
“[3] Course \n” +
“[4] Exit”);
choice =Integer.parseInt(str);
if(choice ==1)
JOptionPane.showMessageDialog(null, “iana mel f. galang”);
else if(choice ==2)
JOptionPane.showMessageDialog(null, “DWCL”);
else if(choice ==3)
JOptionPane.showMessageDialog(null, “Business Administration”);
else if(choice ==4)
JOptionPane.showMessageDialog(null, “by: Eugene”);
}
}
output