Closed awhitford closed 8 years ago
new Boolean(x)
Boolean.valueOf(x)
Long
Integer
String
parse
new BigDecimal(0)
BigDecimal.ZERO
BigInteger
new Boolean(x)
, theBoolean.valueOf(x)
is be more efficient.Long
,Integer
, etc.String
to a primitive can often be done via aparse
new BigDecimal(0)
can leverage the singletonBigDecimal.ZERO
(same forBigInteger
)