• Card 73 / 76: Both the getMessage and toString methods return information about exceptions that are caught. Which method returns the basic information as well as the class name of the exception?
    A) getMessage()
    B) toString()
    C) getData()
    D) toOutput()

    Answer:
    B) toString()

  • 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:

B. The toString method returns the basic information of an exception being caught as well as the class name—for example, “java.io.FileNotFoundException: … (The filename, directory name, or volume label syntax is incorrect)”.

A, C and D are incorrect.

A is incorrect because the getMessage method returns only the basic information of an exception being caught, not the class name—for example, “… (The filename, directory name, or volume label syntax is incorrect)”.

C is incorrect because there is no getData method.

D is incorrect because there is no toOuput method.

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
Brenna Fike
Start Quiz
Marion Cabalfin
Start Quiz
Hannah Sheth
Start Quiz
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>