Page 338 - CA_Blue( J )_Class10
P. 338
MIND DRILL
Solved Questions
A. Tick ( ) the correct answer.
1. Predefined classes provided by Java are called ………………… classes.
a. Library b. User-defined
c. Compiler d. Derived
2. Which of the following is a primitive data type?
a. Double b. Integer
c. float d. Boolean
3. Which of the following is a correct composite data type?
a. Class b. Interface
c. Array d. All of them
4. Which of the following is used to convert primitive data type into object?
a. User-defined class b. Wrapper class
c. Both a and b d. None of these
5. Which of the following methods is used to convert the parameter passed to lowercase?
a. isLowerCase() b. isUpperCase()
c. toUpperCase() d. toLowerCase()
6. Which of the following is a wrapper class in Java?
a. String b. Integer
c. ArrayList d. Scanner
7. What is the purpose of wrapper classes in Java?
a. To wrap primitive data types into objects
b. To provide methods for mathematical operations
c. To manipulate strings efficiently
d. To handle input/output operations
8. Which wrapper class represents characters in Java?
a. String b. Character
c. Integer d. Double
9. What is the method used to convert a string to an integer using the Integer wrapper class?
a. parseInt() b. valueOf()
c. toString() d. intValue()
10. Which of the following methods is used to convert an integer to a string using the Integer wrapper class?
a. parseInt() b. valueOf()
c. toString() d. intValue()
Answers
1. a 2. c 3. d 4. b 5. d 6. b 7. a 8. b 9. a 10. c
B. Fill in the blanks.
1. ………………… is used for checking whether the parameter is a letter or digit or not.
2. ………………… and ………………… methods convert String to double.
3. Automatic conversion from object of wrapper class to its primitive data type is called ………………….
4. ………………… method is used for checking whether the parameter is a space or not.
336336 Touchpad Computer Applications-X

