Explain the term Automatic Conversion.
Advertisements
Question
Explain the term Automatic Conversion.
Explain
Advertisements
Solution
- Automatic Conversion in Java is the process of converting a value from one data type into another compatible data type automatically by the Java compiler, without requiring explicit instructions from the programmer. It is also known as Implicit Type Conversion or Widening Conversion.
- This conversion generally occurs when a value of a smaller data type is assigned to a variable of a larger data type. It does not require a type casting operator and generally preserves the original value, although some precision may be lost.
shaalaa.com
Is there an error in this question or solution?
Chapter 6: Variables and Expressions - EXERCISE [Page 131]
