Search lessons

Suggested searches

Browse

Main

public class Main {
    
    public static void main(String[] args) {
        Car car = new Car("Honda", "Accord", 16, 12);
        car.printInfo();
        car.addMiles(12);
        car.printInfo();

        Taxi taxi = new Taxi(2);
        taxi.printInfo();
        taxi.addMiles(1000);
        taxi.printInfo();
    }
}

Progress is available when JavaScript is enabled.

Manage progress

Progress is saved only in this browser. Export a copy to move it to another device.

Opening a lesson marks it complete on this browser. That records a visit, not understanding or a quiz score. Test yourself with the knowledge checks and labs. How progress works

Edit this lesson · View source