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

Hi,

What is numeric promotion?

Thanks,

Advertisement
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,