Page 50 - CA_Blue( J )_Class10
P. 50
7. Which of the following is an example of static initialization?
a. A = B + C; b. A = 8;
c. Both a and b d. None of these
8. Which of the following is the default value of long data type?
a. 0 b. 0.0
c. 0L d. 0.0f
9. In which of the following conversions, we can assign a value of larger data type to a smaller data type?
a. Explicit Type Conversion b. Implicit Type Conversion
c. Both a and b d. None of these
10. Which of the following is a symbol used to perform a calculation?
a. Punctuator b. Variable
c. Separator d. Operator
11. Which of the following are the reserved words in Java?
a. Variables b. Literals
c. Keywords d. Punctuators
12. Which of the following is the name given to a variable in Java?
a. Identifier b. Operator
c. Value d. None of these
13. Which of the following is a process of changing one type value to another type?
a. Declaration b. Escape sequence
c. Delimiters d. Type conversion
14. Which of the following is an example of a special character in Java?
a. C b. 5
c. () d. Z
15. Which of the following is a valid identifier in Java?
a. 123variable b. variable_123
c. #variable d. variable-123
16. What is the default value of a boolean variable in Java?
a. 0 b. 1
c. false d. true
17. What will be the result of the following code snippet?
int i = 100;
byte b = (byte) i;
System.out.println(b);
a. 100 b. Compilation error
c. 0 d. Type mismatch error
18. Which of the following is an example of a literal in Java?
a. + b. 123
c. if d. main
Answers
1. d 2. d 3. b 4. d 5. b 6. c 7. b 8. c 9. a 10. d 11. c
12. a 13. d 14. c 15. b 16. c 17. a 18. b
B. Fill in the blanks.
1. Initializing a variable during the execution of a program is termed as ………………… initialization.
2. The ………………… data type is not compatible with any other primitive data types.
3. ………………… conversion is a conversion that is done automatically.
4. Unicode stands for ………………….
5. ………………… are special characters.
6. The ………………… literals allow only two values true or false.
7. A character preceded by a backslash (\) is an ………………….
4848 Touchpad Computer Applications-X

