-4
我有以下代码:爪哇 - 类预期的错误
import javax.sqing.JOptionPane;
public class DebugTwo4
{
public static void main(String[] args)
{
string costString;
double cost;
final double TAX = 0.06;
costString = JOptionPane.showInputDialog("Enter price of item you are buying", "Purchases", JOptionPane.INFORMATION_MESSAGE);
cost = double.parsecost (coststring);
JOptionPane.showMessageDialog(null,"With " + TAX * 100 + "% tax, purchase is $" + (cost - cost * TAX));
}
}
我收到以下错误:
DebugTwo4.java:11: error: class expected
cost = double.parsecost (coststring);
DebugTwo4.java:11: error: ';' expected
cost = double.parsecost (coststring);
请帮帮忙!
将来,在您的答案中输入您的代码。与尝试读取/重新输入屏幕截图中的内容相比,它将使回答更加容易。 – ThreadedLemon 2015-02-12 00:21:02
欢迎来到StackOverflow。请将您的代码*发布在问题本身中。此外,请务必清楚解释您收到的错误,您尝试解决的错误,以及您需要帮助的具体内容。 – 2015-02-12 00:21:03