Int: 4 bytes
Float: 4
double: 8
char: 1
boolean: 1
four
In Java, you can use either a float or a double
The number of bytes occupied by a specific data type depends on the implementation. In general, the double data type is eight bytes long, but you can check it using sizeof(double). In 16-bit,32-bit compilers double size is 8 bytes.It looks like float because it stores scientific and financial like big float values.
8 bytes
eight primitive data types are: -boolean -char -byte -short -int -long -double -float
four
In Java, you can use either a float or a double
byte, short, int, long, char, float, double, boolean
byte short long int char float double boolean
The number of bytes occupied by a specific data type depends on the implementation. In general, the double data type is eight bytes long, but you can check it using sizeof(double). In 16-bit,32-bit compilers double size is 8 bytes.It looks like float because it stores scientific and financial like big float values.
char, boolean, byte, short, int, long, double, or float
It supports float, double, boolean, int, char, short, long, ezekiel, jimenez, and macasusi
8 bytes
eight primitive data types are: -boolean -char -byte -short -int -long -double -float
Double is more precise than float. The 4 bytes saved on a float are usually not very relevant. However, if you need to save large amounts of numbers (e.g. in an array), and you don't need the extra precision, you might save some memory by using float.
4
The non-class Java data types are primitives: * byte * short * int * long * float * double * boolean * char