동일한 폴더의 다른 클래스에서 "송장"방법을 호출하는 프로그램을 작성하고 있습니다.자바 - 오류 : 기호를 찾을 수 없습니다
strInvoice= invoice();
JOptionPane.showInputDialog(null, strInvoice, "*Name*'s Party Store", -1);
이는 방법은에있는 클래스 파일의 모습입니다 : 내 프로그램의 방법에 따라 호출 오전 방법
다음error: cannot find symbol
strInvoice = invoice();
^
symbol: method invoice()
이 : 나는 다음과 같은 오류가 계속 같은 폴더 :
public String invoice()
{
String strInfo=""; //string returned containing all the information
double dBalloonNoDiscount; //balloon total without discount
double dCandleNoDiscount; //candle total without discount
double dBannerNoDiscount; //banner total without discount
double dSubtotal; //subtotal
double dTax; //tax
double dShippingCost; //shipping cost
double dTotal; //total
String strShippingType; //shipping type
dBalloonNoDiscount = balloons * 2.50;
dCandleNoDiscount = candles * 6.00;
dBannerNoDiscount = banners * 2.00;
dSubtotal = subtotal();
dTax = tax();
dShippingCost = shippingCost();
strShippingType = shippingType();
dTotal = orderTotal();
strInfo += "\nQuantity"
+ "\n\nBalloons: " + balloons + " @ $2.50 = "
+ df.format(dBalloonNoDiscount) + "* Discount Rate: "
+ df.format(discount('B')) + " = "
+ df.format(subtotal('B'))
+ "\n\nCandles: " + candles + " @ 6.00 = "
+ df.format(dCandleNoDiscount) + "* Discount Rate: "
+ df.format(discount('C')) + " = "
+ df.format(subtotal('C'))
+ "\n\nBanners: " + banners + " @ $2.50 = "
+ df.format(dBannerNoDiscount) + "* Discount Rate: "
+ df.format(discount('N')) + " = "
+ df.format(subtotal('N'))
+ "\nSubtotal: " + df.format(dSubtotal)
+ "\n Tax: " + df.format(dTax)
+ "\nShipping: " + df.format(dShippingCost) + " - "
+ strShippingType
+ "\n Total: " + dTotal;
return strInfo;
}
충분한 정보가 있기를 바랍니다. 나는 그 문제를 찾을 수없는 것 같습니다.
OO 및 Java의 몇 가지 기본 사항을 살펴보고 몇 가지 간단한 예제를 시도해보고 사용해보십시오. 그것은 장기적으로 도움이 될 것입니다. – Krishna