📜  在 java 代码示例中声明浮点变量时出错

📅  最后修改于: 2022-03-11 14:52:20.811000             🧑  作者: Mango

代码示例1
/* 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 ;