2022 PRACTICE TEST 2026 TESTED
QUESTIONS WITH COMPLETE ANSWERS
GRADED A+
⩥ Which of the following are NOT Java primitive data types? Answer:
String
Random
Array
Math
class
⩥ Which of the following are Java primitive data types? Answer: Float
Int
Boolean
Char
Double
⩥ Which of the following are NOT Java primitive data types? Answer:
String
Static
Array
,Math
Class
⩥ Which of the following are Java primitive data types? Answer: Float
Int
Boolean
Char
Double
⩥ Which of the following Java literals have the data type char? Answer:
'a'
'\n'
⩥ Which of the following Java literals have the data type int? Answer:
123
-3
⩥ Which of the following Java literals have the data type boolean?
Answer: True
False
⩥ Which of the following Java literals have the data type float? Answer:
3f
, 3.14f
⩥ Which of the following Java literals have the data type double?
Answer: 3.14
3.0
⩥ Which of the following Java literals have the data type String?
Answer: "3.0"
"true"
(quotations are the reason why)
⩥ 3 + 5, result will be what data type? Answer: Int
⩥ 3.0 + 5.0, result will be what data type? Answer: double
⩥ 3 + 5.0, result will be what data type? Answer: double
⩥ 3f + 5.0, result will be what data type? Answer: double
⩥ 5/3, result will be what data type? Answer: Int
⩥ 5.0/3.0, result will be what data type? Answer: Double