الرجوع
تسجيل الدخول

What gets printed when a Vehicle object is instantiated using the default constructor?

public class Vehicle {
    private String type;
    Vehicle() {
        this("Car");
        System.out.println("Vehicle created");
    }
    Vehicle(String type) {
        System.out.println(type + " created");
    }
}