Instruction
- Total number of questions : 10.
- Time alloted : 10 minutes.
- Each question carry 1 mark.
- No Negative marks
- DO NOT refresh the page.
- All the best :-).
1. |
What is the range of short data type in Java? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: Short occupies 16 bits in memory. Its range is from -32768 to 32767. |
2. |
What is the numerical range of a char data type in Java? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: Char occupies 16-bit in memory, so it supports 2^16 i:e from 0 to 65535. |
3. |
Which of these is long data type literal? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: Data type long literals are appended by an upper or lowercase L. 0x99fffL is hexadecimal long literal. |
4. |
Which of these is necessary condition for automatic type conversion in Java? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: None. |
5. |
Which of these operators is used to allocate memory to array variable in Java? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: Operator new allocates block of memory specified by the size of array, and gives the reference of memory allocated to the array variable. |
6. |
Which of the following can be operands of arithmetic operators? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: The operand of arithmetic operators can be any of numeric or character type, But not boolean. |
7. |
Which of these is not a bitwise operator? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: <= is a relational operator. |
8. |
What is the output of relational operators? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: None. |
9. |
Which of these have highest precedence? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: Order of precedence is (highest to lowest) a -> b -> c -> d. |
10. |
Which of these selection statements test only for equality? |
|||||||||||||||||||
|