setInitialQuantity メソッドの宣言でこれらのエラーが発生する理由がわかりません。
public class Invoice
{
private int quantity;
private String partNum;
private String partDesc;
private double unitPrice;
//constructor
public Invoice ( int initialQuantity, String partNumber, String partDescript, double unitPrice)
{
public void setInitialQuantity ( int initialQuantity )
{
quantity = initialQuantity;
}
}//end Invoice constructor
}
エラー:
javac Invoice.java
Invoice.java:16: illegal start of expression
public void setInitialQuantity ( int initialQuantity )
^
Invoice.java:16: illegal start of expression
public void setInitialQuantity ( int initialQuantity )
^
Invoice.java:16: ';' expected
public void setInitialQuantity ( int initialQuantity )
^
Invoice.java:16: ';' expected
public void setInitialQuantity ( int initialQuantity )
^
4 errors