OOP Basic Multiple Questions and Answers.




16.Which member can never be accessed by inherited classes?
A. Private member function
B. Public member function
C. Protected member function
D. All can be accessed

17.Which syntax among the following shows that a member is private in a class?
A. private: functionName(parameters)
B. private(functionName(parameters))
C. private functionName(parameters)
D. private::functionName(parameters)

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()

19. 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()

20.Which error will be produced if private members are accessed?
A. Can’t access private message
B. Code unreachable
C. Core dumped
D. Bad code

«»


Read More :

Quick Links

GAT Subject



   Computer Science    English    Agriculture    Botany    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC    PPSC    NTS