answersLogoWhite

0

Then data will be lost. Quite often, at least in Java, the compiler will protest at compile time, basically forcing you to rethink your strategy.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

When you assign the value 5.628 into a float variable how can you avoid getting the decimal truncation warning?

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).


How can I convert a float to a double in Java?

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.


Assign the value of pie ie 3.142 to a variable with requisite data type?

float pi = 3.142; // Note: pi is an irrational number, there is no "exact" value of pi


Can there be a negative float?

A float variable can store both positive and negative numbers.


'How many bytes is a float variable'?

4


Dependent variable on a float or sink experiment?

The dependent variable in a float or sink experiment is whether the object being tested floats or sinks in water. This variable is influenced by factors such as the object's density and volume, which determine its buoyancy in the water.


What is the is the independent variable in the soda sink or float experiement?

Pirate


How to declare a float variable in java?

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.


How do you declare a pointer variable in c?

int* pint; // instantiate a pointer to an int. float* pflt; // instantiate a pointer to a float.


How do you declare a variable with initial value of 20.1234?

float myVariable = 20.1234;


Independent variable on float or sink experement?

The independent variable in a float or sink experiment would typically be the object's density or mass, which can be manipulated and varied by the researcher. By changing the density or mass of the object being tested, you can observe how it influences whether the object will float or sink in a liquid.


Controlled variable of the egg flotation?

it is when a egg float on the matter of something making it float.