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

What is the output of the code ?

class MyClass {
    void MyClass() {
        System.out.println("Not a constructor, just a method with class name.");
    }
    
    MyClass() {
        System.out.println("This is the actual constructor.");
    }

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