In Java, the float keyword is used to declared a variable as a numeric type. A float value can hold a 32-bit floating-point number. For example:

float balanceAmount = 909.999;

The float keyword can be used to declared return type of a method as well:

public float getBalance() {
    return balanceAmount;
}

 

See all keywords in Java.

 

Related Topics:

 

Other Recommended Tutorials:


About the Author:

is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.



Add comment

   


Comments 

#1Shailendra Katolkar2015-08-11 04:09
i want to become a expert in java.
Quote