什么是Java中的布尔和布尔之间的区别? [英] What's the difference between boolean and Boolean in Java?
问题描述
我想了解Java中的布尔
和布尔
类型之间的区别,特别是因为这涉及到GWT。
我知道,方法不支持,但我想要更多的信息,如果它是可用的。
I would like to understand the difference between the Boolean
and boolean
types in Java, specifically as they relate to GWT.
I know that methods are not supported but I want more info if it is available.
推荐答案
我不知道如果GWT的因素有差别,但一般:
I'm not sure if the GWT factor makes a difference but in general:
布尔是一个Java基本类型,而布尔是用于包装一个布尔对象/引用类型
boolean is a java primitive type whereas Boolean is an object/reference type that wraps a boolean
原语和对象之间的转换就像这个被称为装箱/拆箱。
Converting between primitives and objects like this is known as boxing/unboxing.
下面是详细信息:
<一个href=\"http://javaeye.word$p$pss.com/2008/06/17/boxing-and-unboxing-conversion/\">http://javaeye.word$p$pss.com/2008/06/17/boxing-and-unboxing-conversion/
为什么盒子你问?
<一个href=\"http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html\">http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html
<一个href=\"http://www.javapractices.com/topic/TopicAction.do?Id=197\">http://www.javapractices.com/topic/TopicAction.do?Id=197
这篇关于什么是Java中的布尔和布尔之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!