1.

If you omit the visibility keyword in your method declaration, by default the method will be declared as ____________(a) public(b) private(c) protected(d) friendlyThe question was asked in a job interview.My question comes from Object Basics-1 topic in section Objects and Databases in PHP of PHP

Answer» CORRECT choice is (a) PUBLIC

For explanation I WOULD SAY: By declaring a method public, you ENSURE that it can be invoked from outside of the current object.


Discussion

No Comment Found

Related InterviewSolutions