Ask Google

Custom Search

Thursday, February 17, 2011

Difference between private, protected, and public?

What is the difference between private, protected, and public?

These keywords are for allowing privilages to components such as functions and variables.

Public: accessible to
all classes
Private: accessible
only to the class to which they belong
Protected: accessible to the
class to which they belong and any subclasses.

No comments:

Post a Comment

5L15K

  © Blogger template The Beach by Ourblogtemplates.com 2009

Back to TOP