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. |
An expression involving byte, int, and literal numbers is promoted to which of these? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: An expression involving bytes, ints, shorts, literal numbers, the entire expression is promoted to int before any calculation is done. |
2. |
Which of these occupy first 0 to 127 in Unicode character set used for characters in Java? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: First 0 to 127 character set in Unicode are same as those of ISO-LAIN-1 and ASCII. |
3. |
Literal can be of which of these data types? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: None |
4. |
If an expression contains double, int, float, long, then whole expression will promoted into which of these data types? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: If any operand is double the result of expression is double. |
5. |
Which of these is an incorrect Statement? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: Array can be initialized using both new and comma separated expressions surrounded by curly braces example : int arr[5] = new int[5]; and int arr[] = { 0, 1, 2, 3, 4}; |
6. |
Decrement operator, −−, decreases value of variable by what number? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: None. |
7. |
Which right shift operator preserves the sign of the value? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: None. |
8. |
Which of these operators can skip evaluating right hand operand? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: Operator short circuit and, &&, and short circuit or, ||, skip evaluating right hand operand when output can be determined by left operand alone. |
9. |
What is the order of precedence (highest to lowest) of following operators? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: None. |
10. |
Which of these jump statements can skip processing remainder of code in its body for a particular iteration? |
|||||||||||||||||||
|