ICSE Class 8 Computers Differentiate Between the Following
Distinguish between Integer and Floating literal
Values & Data Types Java
35 Likes
Answer
Integer Literal | Floating Literal |
---|---|
Integer literal represents whole number values like 2, -16, 18246, 24041973, etc. | Floating literal represents fractional numbers like 3.14159, -14.08, 42.0, 675.238, etc. |
Integer literals are assigned to variables of data type — byte, short, int, long, char | Floating literals are assigned to variables of data type — float, double |
Answered By
26 Likes