Answer the question
In order to leave comments, you need to log in
Long or long in BigDecimal constructor?
I work with java.lang.reflect, in runtime I need to create a BigDecimal object,
BigDecimal.class.getConstructor(long.class);//работает
BigDecimal.class.getConstructor(Long.class);// - не работает
java.lang.NoSuchMethodException: java.math.BigDecimal.<init>(java.lang.Long)
BigDecimal num = new BigDecimal((Long));
BigDecimal num = new BigDecimal((long));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question