الرجوع
تسجيل الدخول
public class Student {
    private String name;
    private int age;

    public Student(String name) {
        this.name = name;
        this(18); 
    }

    public Student(int age) {
        this.age = age;
        System.out.println("Student age set to " + this.age);
    }
}

What will be the output when the following code is executed?

Student newStudent = new Student("Alice");