Java “双”与“双”的区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20437003/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Difference between "Double" and "double"
提问by Ashwin Shirva
What is the difference between Double
and double
?
Double
和 和有double
什么区别?
采纳答案by But I'm Not A Wrapper Class
Double
is an object and double
is a primitive data type. See this answer for more details.
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 类将原始类型 double 的值包装在一个对象中。Double 类型的对象包含一个类型为 double 的字段。
Source: http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html
来源:http: //docs.oracle.com/javase/7/docs/api/java/lang/Double.html