hi, All.
I know that how to use public, protected and private variables.
for ex: public i can use it another class, protected i can use in main and being inherited class and private only the class where it declared.
but i dont understand what is purpose to it public, private, or protected. what does it mean?
azegurb 1 Posting Whiz in Training
Recommended Answers
Jump to PostPublic == Available to everyone who can access the class
Private == Available only within the class where the function/variable is
declared
protected = Available only within the class, or any class that is derived
from the classLet me know if you need more :)
All 4 Replies
minitauros 151 Junior Poster Featured Poster
MooGeek 16 Posting Whiz
azegurb 1 Posting Whiz in Training
MooGeek 16 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.