hi, i'm working on a little project i made for myself, i want to create a menu with 4 choices and i want to use an array cause im struggling to understand how write them, now ive started to do it but i've lost myself in the code and don't know what to do let me know what you think!
import javax.swing.*;
public class food
{
private int idnum;
{
int order;
int[] idnum = {1, 2, 3, 4}
menu = JOptionPane.showInputDialog(null, "The menu today is 1 chicken 2 pizza 3 chocolate and 4 water");
order = Integer.parseInt(menu);
if(order == idnum)
JOptionPane.showMessageDialog(null, "You have ordered
i want to be able to lets say if someone enters 1 for chicken how do i tell the program that the person ordered menu item 2 and have the program figure out that item number 2 is chicken or something i'm confused!