Я получаю некоторые ошибки, говоря, что он не может найти символмне нужно помочь выяснить, что случилось с моим кодом
import javax.swing.JOptionPane;
public class ShippingSales
{
public static void main (String [] args)
{
int weight, miles;
String temp;
double shippingcharge, rate;
shippingcharge = miles * rate;
miles = 500;
temp = JOptionPane.showInputDialog("Enter the weight of the package");
weight = Interger.parseInt(temp);
if (weight <= 2)
{
JOptionPane.showMessageDialog(null, "Your total amount is " + shipppingcharge);
rate = 1.10;
}
if (weight > 2 && weight<= 6)
{
JOptionPane.showMessageDialog(null, "Your total amount is " + shipppingcharge);
rate = 2.20;
}
if (weight > 6 && weight<= 10)
{
JOptionPane.showMessageDialog(null, "Your total amount is " + shipppingcharge);
rate = 3.70;
}
if (weight > 10)
{
JOptionPane.showMessageDialog(null, "Your total amount is " + shipppingcharge);
rate = 3.80;
}
}
}
Какие символы? если компилятор говорит, что «shipppingcharge» не найден. Вам просто нужно проверить, правильно ли вы это произносите - это не так. То же самое для «Interger». –