Java MCQ - English
An expression involving byte, int, and literal numbers is promoted to which of t
Home | Discussion ForumAn expression involving byte, int, and literal numbers is promoted to which of these?
int
long
byte
float
Answer : A
View More Related Question
1) Which of the following automatic type conversion will be possible?
2) If an expression contains double, int, float, long, then whole expression will promoted into which of these data types?
3) What is the error in this code? byte b = 50;
b = b * 50;
b can not contain value 100, limited by its range.
* operator has converted b * 50 into int, which can not be converted to byte without casting.
b can not contain value 50.
No error in this code
View Answer
4) An expression involving byte, int, and literal numbers is promoted to which of these?
5) Which of these is necessary condition for automatic type conversion in Java?
The destination type is smaller than source type
The destination type is larger than source type
The destination type can be larger or smaller than source type
None of the mentioned
View Answer