• Card 22 / 76: 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) {…}

    Answer:
    A) public StringBuilder append (short s) {…}

  • Keyboard Shortcuts

    Previous Card ← Previous Card Button
    Next Card → Next Card Button
    Flip Card Space-Bar
<< First < Previous Next > Last >>

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now
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.

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

My OCA Mock

Author:

Access: Public Instant Grading

Flash Cards plugin by Curtis Blackwell github.com/curtisblackwell/flash_cards
Google Play and the Google Play logo are trademarks of Google Inc.
Ask
JavaChamp Team
Start Quiz
Szilárd Jankó
Start Quiz
Caitlyn Gobble
Start Exam
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>