28.4k views
1 vote
To create an instance of Big Decimal for 454.45, use ________.

A) Big Decimal(454.45)
B) New Big Decimal(454.45)
C) New Big Decimal("454.45")
C) Big Decimal("454.45")

User Astr
by
4.3k points

1 Answer

4 votes

Answer:

C.

Step-by-step explanation:

Based on the Java documentation; when creating an instance of BigDecimal, we can pass a string as a constructor.

System.out.println(new BigDecimal("454.45"));

User Prashant Gupta
by
5.2k points