Multiple choice

Which of the following is true about automatic type conversion in java?

i. Both the variable types should be compatible ii. The destination type is smaller than the source type iii. Both the variables can have any data types iv. The destination type is larger than the source type

  1. i. and ii both are correct.

  2. i. and iv. both are correct.

  3. ii. and iii. both are correct.

  4. ii. only is correct

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This answer is correct. When the automatic type conversion has to happen between two variables, then both the data types should be compatible and also the destination type should be larger than the source type.