Im getting an error but there doesnt seem to be anything obvious to me.
The purpose is to make a Foot-Meter/Meter-Foot conversion table.
Code:
public class Problem6_9 {
public static void main (String[] args) {
//Creating the heading for table
System.out.printf("%-10s%10s | %-10s%10s\n" , "Feet","Meters","Meters","Feet");
System.out.println("----------------------------------------------");
double startMeter = 20.0;
for (double i = 1.0; i<=10; i++) {
System.out.printf("\"%-10.1f%10.3f | %-10.1f%10.3f\n" , i, ftoMeter(i) ,"|",
startMeter, mtoFoot(startMeter));
startMeter += 5.0;
}
}
public static double ftoMeter(double foot) {
return 0.305 * foot;
}
public static double mtoFoot(double meter) {
return 3.279 * meter;
}
}
Error:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at Problem6_9.main(Problem6_9.java:2)
I've tried to 'Clean' the project and restart but im getting the same error, but it doesnt provide much feedback about what is wrong.