Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

OOP F4 (M7 M8)

QuestionAnswer
Here is a situation: Birthday happy; happy = new AdultBirthday( "Joe", 39); happy.greeting(); Which greeting() method is run: the one defined for Birthday or the one defined for AdultBirthday? The one defined for AdultBirthday because that is the type of the object referred to by happy.
A method that is declared final cannot be overridden in a subclass. true
An abstract class cannot have instance data and non-abstract methods. false
Which among the following is the language which supports classes but not polymorphism? Ada
Which of the following classes fail to compile? abstract class X { abstract void method(); } class Y extends X { } class Z extends Y { void method() { System.out.println("Class Z"); } } Y
Can an abstract parent class have non-abstract children? Yes--an abstract parent can have both abstract and non-abstract children.
What is an abstract class? An abstract class is class which cannot be instantiated.
If two classes combine some private data members and provides public member functions to access and manipulate those data members. Where is abstraction used? Using public member functions to access and manipulate the data members
Which of the following statement(s) is/are correct? X: An abstract class can have one or more abstract methods. Y: An abstract class can have only abstract. Non abstract (or concrete) methods are not allowed. X only
X: By wrapping the desired code in a try block followed by a catch block to catch the exceptions. Y: List the desired exceptions in the throws clause of the method and let the caller of the method handle those exceptions. Both X and Y
Which of these is a super class of all errors and exceptions in the Java language? Throwable
Which symbol should be used to separate the type of exception handler classes in a single catch block? |
To catch the exceptions ___________________ An object must be created to catch the exception
Only way to enable assertion for your program is by using command line arguments. False
Attempting to instantiate an object of an abstract class is a logic error. false
What must a non-abstract child do about an abstract method in its parent class? A child must override an abstract method inherited from its parent by defining a method with the same signature and same return type.
Polymorphism is a feature of object oriented programming. True
Unfortunately, polymorphic programs make it difficult to add new capabilities to a system. false
Which of the following is FALSE about abstract classes in Java A class can inherit from multiple abstract classes.
Which of the following classes fail to compile? class X { abstract void method(); } abstract class Y extends X { } class Z extends Y { void method() { } } X
MethodX might encounter an IOException or an AWTException, but handles neither. How should the header for methodX be written? ... methodX(...) throws IOException, AWTException
What is an exception? Problem arising during runtime
Program throws ___________ if assert statement fails. java.lang.AssertionError
Created by: pioneerxxXXxx
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards