1.

Which among the following is the main advantage of using local classes?(a) Make program more efficient(b) Makes program execution faster(c) Helps to add extra functionality to a function(d) Helps to add more members to a functionThis question was addressed to me by my school teacher while I was bunking the class.Enquiry is from Local Class topic in section Class Members & Types of Object Oriented Programming

Answer»

The correct OPTION is (c) Helps to add extra functionality to a function

Easy explanation - The closest answer is to add more functionalities to a function or to MAKE some specific FUNCTIONS to be generic. Adding more members to a function can be DONE directly but to add some special functionality that are encapsulated, can be done USING local classes.



Discussion

No Comment Found

Related InterviewSolutions