1.

In a Java program, Rajat wants to use a variable to store the quantity of an item which may be in whole numbers or decimals. Write a suitable Java statement to declare the variable for the above mentioned purpose.

Answer»

He can use float or double type od variable. double num;

or

float num;



Discussion

No Comment Found