Computer Science

Distinguish between Integer and Floating constant

Values & Data Types Java

45 Likes

Answer

Integer ConstantFloating Constant
Integer Constants represent whole number values like 2, -16, 18246, 24041973, etc.Floating Constants represent fractional numbers like 3.14159, -14.08, 42.0, 675.238, etc.
Integer Constants are assigned to variables of data type — byte, short, int, long, charFloating Constants are assigned to variables of data type — float, double

Answered By

18 Likes


Related Questions