KnowledgeBoat Logo

Computer Applications

Distinguish between Integer and float Constant.

Values & Data Types Java

138 Likes

Answer

Integer ConstantFloat Constant
Integer Constants represent whole number values like 2, -16, 18246, 24041973, etc.Float 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, charFloat Constants are assigned to variables of data type — float, double

Answered By

92 Likes


Related Questions