twinclw2002
Programmer
i have written this program but it is not compiling. could u please tell me where and what is the error
import javax.swing.JOptionPane;
import javax.swing.*;
public class ViewList {
public static void main(String[] args)
{
String output;
output =" Baked Beans"+ "\t"+"£0.35 per tin"+" \n" +"Cornflakes"+"\t"+"£1.00 per packet"+"\n" +"Sugar"
+"\t"+"£0.50 per packet" +" \n"+ "Tea Bags"+ "\t"+"£1.15 per packet" + "\n" +"Instant Coffee"+"\t"+"£2.50 per jar" +
"\n" +"Bread"+"\t"+"£0.50 per loaf"+ "\n" + "Sausages"+ "\t "+"£1.30 per packet" +"\n "+"Eggs" + "\t" +"£0.75 per half dozen"
+" \n" + "Milk" + "\t" + "£0.65 per carton" + "\n" + "Potatoes" + "\t" + "£1.00 per kg bag";
JOptionPane.showMessageDialog( null, output, "view items"
;
System.exit(0);
}
}
import javax.swing.JOptionPane;
import javax.swing.*;
public class ViewList {
public static void main(String[] args)
{
String output;
output =" Baked Beans"+ "\t"+"£0.35 per tin"+" \n" +"Cornflakes"+"\t"+"£1.00 per packet"+"\n" +"Sugar"
+"\t"+"£0.50 per packet" +" \n"+ "Tea Bags"+ "\t"+"£1.15 per packet" + "\n" +"Instant Coffee"+"\t"+"£2.50 per jar" +
"\n" +"Bread"+"\t"+"£0.50 per loaf"+ "\n" + "Sausages"+ "\t "+"£1.30 per packet" +"\n "+"Eggs" + "\t" +"£0.75 per half dozen"
+" \n" + "Milk" + "\t" + "£0.65 per carton" + "\n" + "Potatoes" + "\t" + "£1.00 per kg bag";
JOptionPane.showMessageDialog( null, output, "view items"
System.exit(0);
}
}