It is possible in JDK 1.5 and above. In JDK 1.4, you also cast the Float value into float value by using casting.
For exampe in JDK 1.5, its possible
float f = 12;
Float ff = f;
but in JDK 1.4, you will use casting i.e
float f = 12;
Float ff = (float)f;
with help of type casting it is possible
yes, float is keyword and data type in java
In C float a[8]; In Java float a[] = new float[8];
Only if it's not charred.
In Java, you can use either a float or a double
it is the same as an int, String, or any of the others:float myVar = 5.7f;If you try to assign a decimal number you must place an "f" at the end, otherwise Java will assume you are trying to assign a double.
Yes it is but it is not usually used
if ,while,do , int ,float, for,switch,else,
THIS IS FOR JAVA i don't know about anything about other languages yes it can be assignedthe syntax is:int (number) = (float) numberFOR EXAMPLE:int = a;a = (float ) 5.5;if the (float) is not there then in Java it gives an error saying precision loss of data type
java is not purely oops because of primitive types in java like int and float double
At least in Java, that's legal - 2 is treated as an int, which can be converted without problems to the float type.
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.