Question 26 / 90:  Which append declaration does not exist in Java 7?
A  public StringBuilder append (short s) {…}
B  public StringBuilder append (int i) {…}
C  public StringBuilder append (long l) {…}
D  public StringBuilder append (float f) {…}
E  public StringBuilder append (double d) {…}
<< First < Previous Flashcard Next > Last >>
Explanation:

A. The append declaration that includes a short is not included in the StringBuilder class.

This is because the short value is automatically casted to an integer when passed for integer literal. Therefore, the following declaration will also handle a short argument: public StringBuilder append (int i) {…}

B, C, D, and E are incorrect.

B is incorrect because the append declaration that includes an int is included in the StringBuilder class.

C is incorrect because the append declaration that includes a long is included in the StringBuilder class.

D is incorrect because the append declaration that includes a float is included in the StringBuilder class.

E is incorrect because the append declaration that includes a double is included in the StringBuilder class.

Exam Home Page
https://www.jobilize.com/quiz-my-oca-mock-exam-by-mike-wolf

My OCA Mock

Author:

Access: Public Instant Grading

Ask
Yasser Ibrahim
Start Quiz
Danielle Stephens
Start Quiz
Robert Murphy
Start Test
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/quiz-my-oca-mock-exam-by-mike-wolf" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>