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

What will the output be when this code is run?

class YourClass {
    YourClass() {
        System.out.println("Constructor is running.");
    }
    
    void YourClass() {
        System.out.println("This is a method, not a constructor.");
    }

    public static void main(String[] args) {
        YourClass obj = new YourClass();
        obj.YourClass();
    }
}