Assignment operator overloading now works only via static valueOf method.
In cases we can't add valueOf method to a class we may use constructors:
BigDecimal a = "123"
will be transformed to
BigDecimal a = new BigDecimal("123")
(there is no valueOf(String) method in j.m.BigDecimal)
But this will add more ambiguity.
Assignment operator overloading now works only via static valueOf method. In cases we can't add valueOf method to a class we may use constructors:
BigDecimal a = "123"
will be transformed toBigDecimal a = new BigDecimal("123")
(there is no valueOf(String) method in j.m.BigDecimal) But this will add more ambiguity.