What is numeric promotion?

Ads

 
 

Share on Google+Share on Google+

Java Coder
What is numeric promotion?
1 Answer(s)      4 years and 6 months ago
Posted in : Java Beginners

Hi,

What is numeric promotion?

Thanks,

Ads
View Answers

April 17, 2013 at 11:20 AM


Hi,

The numeric promotion in java used to convert the smaller number type to larger numeric types. In numerical promotion in java program we converting the byte, char, and short values into int values. We also convert the int values in to long values, if necessary. The long and float values are converted to double values, as per the need.

For more details: http://www.roseindia.net/java/jdk7/UnderscoresinNumericLiterals.shtml

Thanks,


Ads









Ads

 
Advertisement null

Ads