4
There are 8 bytes in a double
four
Int: 4 bytes Float: 4 double: 8 char: 1 boolean: 1
A plain integer variable in C under windows is 2 bytes in 16 bit windows, and 4 bytes in 32 bit windows.
8 bytes
Dependion on the variable there are several methods to do it, this can only be applied to primitive types and arrays, for an array its the "name_of_array.length", for the arraylist this change just a little, it would be like "name_of_array_list.size()", for an int, double, float, long, byte, it would be like "name_of_variable.LENGTH" this is a public variable so you dont need a get, an finally for the String there is a method "name_of_string.length()" this would return the size of this String
32 bits or 4 bytes and an int is not an address, it is a primitive so it directly access the data without a reference.
Pointer is a variable, A variable that stores the address of another variable. Size of a pointer is 2 bytes.
In Java, you can use either a float or a double
When assigning a literal value, such as 5.628, to a float variable, you can avoid the decimal truncation warning by either using the float form of the constant (float var = 5.628f), typecasting the assignment (float var = (float) 5.628), or by making the variable double (double var = 5.628).
A float variable can store both positive and negative numbers.
What's your problem with that? It's a (quasi-)standard value for a 'float'.