Java MCQ - English
Which of the following automatic type conversion will be possible?
Answer : C
View More Related Question
1) What is the output of this program? class char_increment {
public static void main(String args[])
{
char c1 = 'D';
char c2 = 84;
c2++;
c1++;
System.out.println(c1 + " " + c2);
}
}
2) If an expression contains double, int, float, long, then whole expression will promoted into which of these data types?
3) What is the output of this program? class conversion {
public static void main(String args[])
{
double a = 295.04;
int b = 300;
byte c = (byte) a;
byte d = (byte) b;
System.out.println(c + " " + d);
}
}
4) What is Truncation is Java?
View Answer
5) An expression involving byte, int, and literal numbers is promoted to which of these?