Vidyalelo
PHP · Q7

Object Oriented Concept

Programming · PHP · question 7

Q7

If you omit the visibility keyword in your method declaration, by default the method will be declared as.

A.
public
Answer
B.
private
C.
protected
D.
friendly

Answer: Option A

Solution

Answer: Option A
Solution:
By declaring a method public, you ensure that it can be invoked from outside of the current object.