Vidyalelo
Java Programming · Q39

Data Types and Variables

Programming · Java Programming · question 39

Q39

Which of the following automatic type conversion will be possible?

A.
short to int
B.
byte to int
C.
int to long
D.
All of these
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
Option A: short to int
Option B: byte to int
Option C: int to long

These conversions are possible because they involve widening conversions where the destination type can accommodate the values of the source type without loss of information.

So, the correct answer is: Option D: All of these