Aoa... i m new to java.. please help me to correct this program given blew. it shows error of illegal start of esxpression.. how could b it seems as correct program please help me.. thanks alot

**error: illegal start of expression
JOptionPane.showMeassageDialog(null, "ID: " + ID + "name: " + name + "category:
" + category + "price: " + price + "quantity: " + quantity + "description: " + d
escription+);
**

import javax.swing.*;
class product
{
string ID;
string name;
srting category;
string price;
string quantity;
string description;

// Perameterized constructor
public product(string I, string n, string c, string p, string q, string d){
ID = I;
name = n;
category = c;
price = p;
quantity = q;
description = d;
}

// method for displaying product record on GUI

public void print( )
{
JOptionPane.showMeassageDialog(null, "ID: " + ID + "name: " + name + "category: " + category + "price: " + price + "quantity: " + quantity + "description: " + description+); 
}
}

compiling mein pir bhi error aa rha hay.. wat shud i do?

explain a bit more clearly, perhaps?

it's String, not string or srting. you need to remove all the typo's from your code.

and showMessageDialog, not showMeassageDialog.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.