Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 4 (Q.No. 19)
19.
Private data can be accessed by
Discussion:
1 comments Page 1 of 1.
Mahesh Rohidas Awari said:
1 year ago
@All.
Here is the description.
public - members are accessible from outside the class.
private - members cannot be accessed (or viewed) from outside the class.
protected - members cannot be accessed from outside the class, however, they can be accessed in inherited classes.
Default-all members are accessed within the same package but aren't accessible from other packages.
Here is the description.
public - members are accessible from outside the class.
private - members cannot be accessed (or viewed) from outside the class.
protected - members cannot be accessed from outside the class, however, they can be accessed in inherited classes.
Default-all members are accessed within the same package but aren't accessible from other packages.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers