Java: double vs float

后端 未结 6 1193
一整个雨季
一整个雨季 2020-12-09 16:37

In another Bruce Eckel exercise, the code I\'ve written takes a method and changes value in another class. Here is my code:

class Big {
  float b;
}

public         


        
6条回答
  •  离开以前
    2020-12-09 16:42

    Don't use float. There is almost never a good reason to use it and hasn't been for more than a decade. Just use double.

提交回复
热议问题