1Z0-804 · Question #42
Give: What is the result?
The correct answer is C. There are 9 sports cars and 5 trucks. Strings are immutable, therefore no change at line: svar.replace(svar,"convertibles"); Format %[argument_index$][flags][width][.precision]conversion The optional argument_index is a decimal integer indicating the position of the argument in the argument list. The first argument…
Question
Give:
What is the result?
Exhibit
Options
- AThere are 27 sports cars and 5 trucks
- BThere are 27 convertibles and 5 trucks
- CThere are 9 sports cars and 5 trucks
- DThere are 9 convertibles and 5 trucks
- EIllegalFormatConversionException is thrown at runtime
How the community answered
(56 responses)- A11% (6)
- B2% (1)
- C82% (46)
- D2% (1)
- E4% (2)
Explanation
Strings are immutable, therefore no change at line: svar.replace(svar,"convertibles"); Format %[argument_index$][flags][width][.precision]conversion The optional argument_index is a decimal integer indicating the position of the argument in the argument list. The first argument is referenced by "1$", the second by "2$", etc. The optional flags is a set of characters that modify the output format. The set of valid flags depends on theconversion. 's', 'S' general 'd' integral The result is formatted as a decimal / integer
Topics
Community Discussion
No community discussion yet for this question.
