In Eclipse, when I try to run this code, it gives me an error message: "Editor does not contain a main type":
public class GalToLit {
public static void main(String[] args) {
// TODO Auto-generated method stub
double gallons, liters;
gallons = 10; //start with 10 gallons
liters = gallons * 3.7854; //convert to liters
System.out.println(gallons + " gallons is " + liters + " liters.");
}
}