Page 263 - Computer science 868 Class 12
P. 263
MIND DRILL
Solved Questions
A. Tick ( ) the correct option:
1. Methods are required to ………………… .
a. perform a specific task b. do the calculations
c. reduce the size of the program d. All of these
2. The advantage of the method is that it ………………… .
a. removes the errors b. increases the complexity of the program
c. increases the easiness of modification d. None of these
3. Which methods are already declared in Java language?
a. Used defined method b. Built-in method
c. Static method d. Instance method
4. ………………… are built-in methods.
a. Mathematical methods b. String methods
c. Character methods d. All of these
5. Abstraction hides the implementation details and exposes only the necessary functionality of an object. This statement is
………………… .
a. true b. false
c. may or may not be true d. None of these
6. This is a special type which allows methods of the same class and the child class to access the method.
a. Private b. Protected
c. Public d. All of these
7. The………………… methods has the static keyword written along with the method prototype.
a. instance b. static
c. pure d. impure
8. “this” operator refers to the ………………… .
a. current class b. current method
c. current object d. None of these
9. ………………… always has the same name as that of the class.
a. Constructor b. User-defined method
c. Object d. All of these
10. ………………… is a type of constructor.
a. Default constructor b. No-Argument constructor
c. Parameterised constructor d. All of these
Answers
1. a 2. c 3. b 4. d 5. a 6. b 7. b 8. c 9. a 10. d
B. Fill in the blanks:
1. Methods are also called ………………… .
2. The ………………… can be invoked as many times as required for the same object.
3. When arguments are passed to the constructor, then the constructor is known as ………………… constructor.
4. Function overloading is a type of ………………… .
5. The method ………………… checks whether the string in the current object starts with the string in the parameter.
6. The method ………………… is used for extracting all the characters from the index position till the end of the string.
7. The method ………………… is used to convert String to primitive int data type.
8. To manipulate the ………………… type data, the Character wrapper class methods are used.
261
Methods 261

