Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners What is numeric promotion?

Have Programming Question? Ask it here!
 
 
 


Java Coder
What is numeric promotion?
1 Answer(s)      a year and 3 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,



Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com