Display array in JOptionPane
I'm struggling to figure out how to show the contents of my array in a JOptionPane. The array includes an item, price, quantity and priority.For example I'd want it to look like this: "Apples 2.99 2 1" "Cereal 3.99 3 2" I currently have the array outputting to the console because I haven't been able to 'display' the array correctly. Here's what I have as of now: I appreciate all and any help! import java.text.NumberFormat; import javax.swing.JOptionPane; public class ShopList { public static void main(String[] args) { String enterName = JOptionPane.showInputDialog(null, "Username: "); for (int