what is numric type promotion | Sololearn: Learn to code for FREE!

0

what is numric type promotion

11/4/2016 12:23:45 PM

Arsalan Firoz

1 Answer

New Answer

0

During mathematical calculations the Java compiler automatically modifies the data types of some variables so as to maintain homogeneity throughout the mathematical expression. Eg: int x=5 double y=12,5 double ans=x*y To solve this, the compiler first changes the datatype of x into double and then calculates the value in douublw