双语是什么意思? [英] What exactly does Double mean in java?

查看:117
本文介绍了双语是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Java非常新鲜,只想确认哪些 Double 是?它类似于Float还是Int?任何帮助将不胜感激。我也有时会看到大写的 Double ,而另一些小写 double 。如果有人可以澄清这是什么意思,那太棒了!

I'm extremely new to Java and just wanted to confirm what Double is? Is it similar to Float or Int? Any help would be appreciated. I also sometimes see the uppercase Double and other times the lower case double. If someone could clarify what this means that'd be great!

推荐答案

Double 是一个包装类,


Double类在对象中包含
原始类型double的值。类型为Double的
对象包含一个
单个字段,其类型为double。

The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double.

此外,该类还提供了
几种方法将
double转换为String和String到
double,以及其他常量和
方法在处理
double时很有用。

In addition, this class provides several methods for converting a double to a String and a String to a double, as well as other constants and methods useful when dealing with a double.

双重数据类型< a>,

The double data type,


双重数据类型是
双精度64位IEEE 754
浮点数。其价值范围为
4.94065645841246544e-324d至1.79769313486231570e + 308d(正或负)。
对于十进制值,此数据类型为
,一般为默认选择。如上所述
,此数据类型应为
,不得用于精确值,例如
作为货币。

The double data type is a double-precision 64-bit IEEE 754 floating point. Its range of values is 4.94065645841246544e-324d to 1.79769313486231570e+308d (positive or negative). For decimal values, this data type is generally the default choice. As mentioned above, this data type should never be used for precise values, such as currency.

使用其范围检查每个数据类型: Java的原始数据类型

Check each datatype with their ranges : Java's Primitive Data Types.

重要提示:如果您想要使用双精度值,则需要在使用它之前重新思考。 Java Traps:double

Important Note : If you'r thinking to use double for precise values, you need to re-think before using it. Java Traps: double

这篇关于双语是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆