i have tried everything but i keep getting these errors: illegal start of expression public Dvd()...and there's an arrow pointing under the p. the other error is: javalang.nosuchmethoderror.main exception in main thread.
i am providing my code so its not like im asking anyone to do it all for me...only to correct my mistakes cuz apparently i dont know what im doing or im not doing something right.
by the way im using jcreator for this program.
package dvdinventory;
public class Dvd {
public static void main(String[] args) {
String productNumber;
String itemName;
int numberofUnits;
double priceperUnit;
public Dvd()
{
productNumber = "0";
itemName = "";
numberofUnits = 0;
priceperUnit = 0.0;
}
public Dvd(String productNum, String productName, int quantity, double unitPrice)
{
productNumber = productNum;
itemName = productName;
numberofUnits = quantity;
priceperUnit = unitPrice;
}
public String getProductNumber()
{
return productNumber;
}
public String getProductName()
{
return itemName;
}
public int getNumberofUnits()
{
return numberofUnits;
}
public double getPricePerUnit()
{
return priceperUnit;
}
}