Exam MCD - Level 1 All QuestionsBrowse all questions from this exam
Question 14

What is the correct way to format the decimal 200.1234 as a string to two decimal places?

    Correct Answer: D

    The correct way to describe formatting 200.1234 to two decimal places as a string involves the basic structure and correct syntax for formatting. None of the provided options directly offer valid syntax in any specific programming language commonly used for such formatting. However, the closest to an accurate description in plain terms available here would be '200.1234 as String as format: .0#'.

Discussion
sirious09Option: C

C - I agree with C

Aquaworm

If you are not a Java programmer, you may want to look at the Java documentation for the DecimalFormatter class to review documentation on DecimalFormat patterns. https://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html

GGameChangerOption: C

C is correct