+ 1
difference between public, private and protected?
Can any one please explain the difference between public, private and protected. It's very confusing. Thanks in advance :)
3 Réponses
+ 3
public is for example your question, which can all see.
+ 3
Public - you can use anywhere
Private - you can use only inside a class
Protected - you can use inside a class and in classes which inherit from