what is wrong with my code. doesnt compile
public class CarSimulator
{
public static void main(String []args)
{
FuelGauge amountOfFuel = new FuelGauge(0);
Odometer currentMileage = new Odometer(amountOfFuel);
while (FuelGauge.getamountOfFuel < Odometer.getcurrentMileage);
for (FuelGauge.getamountOfFuel < Odometer.getcurrentMileage)
{
System.out.printf("Name = %s\tNumber = %s\n");
}
}
}
here are my compile errors
CarSimulator.java:10: error: > expected
for (FuelGauge.getamountOfFuel < Odometer.getcurrentMileage)
^
CarSimulator.java:10: error: not a statement
for (FuelGauge.getamountOfFuel < Odometer.getcurrentMileage)
^
CarSimulator.java:11: error: illegal start of expression
{
^
CarSimulator.java:11: error: ';' expected
{
^
CarSimulator.java:12: error: illegal start of expression
System.out.printf("Name = %s\tNumber = %s\n");
^
CarSimulator.java:12: error: ')' expected
System.out.printf("Name = %s\tNumber = %s\n");
^
CarSimulator.java:12: error: illegal start of expression
System.out.printf("Name = %s\tNumber = %s\n");
^
CarSimulator.java:12: error: ';' expected
System.out.printf("Name = %s\tNumber = %s\n");
^
CarSimulator.java:12: error: not a statement
System.out.printf("Name = %s\tNumber = %s\n");
^
CarSimulator.java:16: error: class, interface, or enum expected
}
^
10 errors