What is the correct syntax for creating a new object in Perl?

14. What is the correct syntax for creating a new object in Perl?

  1. var object_name = new class_name()
  2. new object_name = class_name()
  3. my object_name = new class_name()
  4. None of these

Answer: C) my object_name = new class_name()

Explanation:

The correct syntax for creating an object in Perl is:

    my object_name = new class_name()

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.