Your vehicle

Report a typo

There is an outer class Vehicle with an inner class Engine. Please, start the engine:

class Vehicle {
    
    // vehicle of your dream

    class Engine {

        void start() {
            System.out.println("RRRrrrrrrr....");
        }
    }
}

Tip: To invoke method start you need to create an instance of the inner class Engine.

Write a program in Java 17
class EnjoyVehicle {

public static void startVehicle() {
// start your vehicle
}
}
___

Create a free account to access the full topic