Consider the following class:

Class Insurance
{
function clsName()
{
echo get_class($this);
}
}
8. $cl = new Insurance();
9. $cl -> clsName();
10. Insurance::clsName();
Which of the following Lines should be commented to print the class name without errors?
a. Line 8 and 9
b. Line 10
c. Line 9 and 10
d. All the three lines 8,9, and 10 should be left as it is.
Ans: d

0 comments:

Post a Comment

Blogger news