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];
To convert a float to a double in Java, you can simply assign the float value to a double variable. Java will automatically perform the conversion for you. Here's an example: java float floatValue 10.5f; double doubleValue floatValue; In this example, the float value 10.5f is assigned to the double variable doubleValue, which will now hold the converted double value.
Only if it's not charred.
In Java, you can use either a float or a double
Yes it is but it is not usually used
if ,while,do , int ,float, for,switch,else,
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.
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.