DATA TYPES
Data Types are used to specify the type of data that is used to store.
- int used to store integer value.
- char used to store characters and we use single quotations to specify character.
- float used to store the decimal values up to 6 decimals.
- double used to store the decimal values up to 8 decimals.
- byte used to store the byte code values.
- short used to store the short Integer values.
- long used to store the long Integer values.
Examples :-
- int
- 106
- 0
- -635
- char
- 'q'
- 'L'
- '+'
- '$'
- float
- 61.562f
- -96.386245f
- 5462.15f
- double
- 0.3215
- 45.21
- 78.96325874
- byte
- 127
- -128
- 65
- short
- 32767
- -32768
- long
- 45255625L
- -54255542L
Comments
Post a Comment