Chp 4-
Values and Data Types in Java:-
Q13) B.
Following are some invalid integer types given. Explain why they are not valid.
(a) 124.7
(b) 2,000
(c) 80 789
Answers
Answered by
41
(a)
java has eight (8) primitive built in data-type.
1. byte
2. int
3. short
4. long
5. float
6. double
7. char
8. boolean
(b)
(i) 124.7 is not a whole no. it's fractional value so it store either in double or float data type.
(ii)2, 000 it's invalid because we cant use (, ) in between number so invalid.
=>optional :: for giving space in between number we used underscore(_)
example 2_000 it valid. try it.
(iii) due to space
java has eight (8) primitive built in data-type.
1. byte
2. int
3. short
4. long
5. float
6. double
7. char
8. boolean
(b)
(i) 124.7 is not a whole no. it's fractional value so it store either in double or float data type.
(ii)2, 000 it's invalid because we cant use (, ) in between number so invalid.
=>optional :: for giving space in between number we used underscore(_)
example 2_000 it valid. try it.
(iii) due to space
nitish8089:
welcome
Answered by
10
Answer:
124.7= it is not a whole no.
2,000=it is invalid because we can't use , in between valid no.
80 789= because there is space in between
Explanation:
plz mark me as brainliest
Similar questions
Math,
7 months ago
Computer Science,
7 months ago
English,
1 year ago
Physics,
1 year ago
Math,
1 year ago