Answers for "creating float variable in java"

2

what is a float java

float int = 3.1415 //pi is a float because it is a decimal
Posted by: Guest on January-08-2020
0

error declaring float variable in java

/* in java the default type for decimal numbers is set to double
   so, you will have to tell java that it is float. just setting the type 
   will not do the job. you will have to add letter "f" at the end of the value
*/

// an example:

float number = 69.69f ;
Posted by: Guest on June-25-2021

Code answers related to "creating float variable in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language