1. DataInputStream is derived from ______________________
Correct Answer is : StreamInput
2. Which attribute can be used to get the size of an array?
Correct Answer is : Array_name.length
3. Number class can’t manipulate ____________________
Correct Answer is : Character values
4. Which function should be used to exit from the program that is provided by System class?
Correct Answer is : exit(int);
5. Which class contain runFinalization() method?
Correct Answer is : System
6. What does load(String)::= function do, in System class?
Correct Answer is : Loads dynamic library for a path name
7. Which is not a System class variable?
8. Which package contains the utility classes?
Correct Answer is : java.util
9. Which among the following best describes the Inheritance?
Correct Answer is : Using the data and functions into derived segment
10. How many basic types of inheritance are provided as OOP feature?
11. Which among the following best defines single level inheritance?
Correct Answer is : A class inheriting a base class
12. Which among the following is correct for multiple inheritance?
Correct Answer is : class student{public: int marks;}s; class stream{int total;}; class topper:public student, public stream{ };
13. Which among the following is correct for hierarchical inheritance?
Correct Answer is : One base class can be derived into other two derived classes or more
14. Which is the correct syntax of inheritance?
Correct Answer is : class derived_classname : access base_classname{ /*define class body*/ };
15. Which type of inheritance leads to diamond problem?
Correct Answer is : Multiple
16. Which access type data gets derived as private member in derived class:
Correct Answer is : Private
17. If a base class is inherited in protected access mode then which among the following is true?
Correct Answer is : Public and Protected members of base class becomes protected members of derived class
18. Members which are not intended to be inherited are declared as:
Correct Answer is : Private members
19. While inheriting a class, if no access mode is specified, then which among the following is true? (in C++)
Correct Answer is : It gets inherited privately by default
20. If a derived class object is created, which constructor is called first?
Correct Answer is : Base class constructor