Name the data types used to store the following values in Java.
i) "Pigeon" ii) –78
iii) 103.6 iv) True
Answers
Answered by
1
Question:-
Name the data types used to store the following values in Java.
i) "Pigeon"
ii) –78
iii) 103.6
iv) True
Answer:-
- String data type...because it is enclosed in double quotes
- int/long/short data type... because it is an integer
- float/double data type... because it is a decimal
- Boolean data type...because Boolean only has True and False... Secondly...it is not enclosed with single/double quotes
Answered by
2
I. String
II. byte, short, int or long
III. float or double
IV. boolean
Similar questions