Object Oriented Programming Using C++ - Section 1 :: Discussion


18. Which function among the following can’t be accessed outside the class in java in same package?
A.public void show()
B.void show()
C.protected show()
D.static void show()
Answer:  Option  C
Explanation:

 The protected members are available within the class. And are also available in derived classes. But these members are treated as private members outside the class and inheritance structure. Hence can’t be accessed. 

Tutorial Link:
Published by:Kiran Manzoor

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers