• Card 25 / 32: public class Dog { } public class Beagle extends Dog{ } public class Kennel { public static void main(String[] args) { Beagle b1 = new Beagle(); Dog dog1 = new Dog(); Dog dog2 = b1; // insert code here //line-9 } } Which, inserted at line 9, will compile? (.)
    A) Beagle b2 = (Beagle) dog1;
    B) Beagle b3 = (Beagle) dog2;
    C) Beagle b4 = dog2;
    D) None of the above statements will compile

    Answer:
    A) Beagle b2 = (Beagle) dog1;
    B) Beagle b3 = (Beagle) dog2;

  • 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
Hide Choices Interactive Question Quiz Home Page
https://www.jobilize.com/prateek-ashtikar-scjp-online-exam-310-065

SCJP Online Exam 310-065

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
Anindyo Mukhopadhyay
Start Quiz
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/prateek-ashtikar-scjp-online-exam-310-065" 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>