answersLogoWhite

0

Is float a data type in Java?

Updated: 8/21/2019
User Avatar

Wiki User

10y ago

Best Answer

Yes it is but it is not usually used

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is float a data type in Java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is float is a keyword in java?

yes, float is keyword and data type in java


What will happen if you will assign a value to float variable which is beyond the range of float data type?

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.


The data type of an item price?

I am assuming that the question is "What would the best data type to represent a price".Although this is open for debate, in Java I think that the best data type for a price is double and the best data type in C# to be decimal.I hope this answers your question.


Is button a data type in Java?

In Java, just about anything is defined as a class; a class is a data type, so yes.


What is the data type of the parameter of the second version of the method?

Given that you haven't specified the method in question it is impossible to say what the parameter's data type would be. However, in statically typed languages such as Java, the method's signature will tell you specifically which data type is to be expected: void f (int x) { // expects an argument of type int // ... } void f (float x) { // expects an argument of type float // ... }


Why should double data type is preferable over float data type?

by default any float value is double


Which is the wrapper class for the data type float?

The wrapper class for float is Float. java.lang.


How do you change a float into a double using java?

with help of type casting it is possible


In access what is the The data type of an item price?

float data


Can a double value be assigned to float variable?

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


What are the only types in Java that are not classes?

The non-class Java data types are primitives: * byte * short * int * long * float * double * boolean * char


Why java called as strong type language?

That means that Java is fairly strict about data types.