Busy. Please wait.
or

show password
Forgot Password?

Don't have an account?  Sign up 
or

Username is available taken
show password

why


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.
We do not share your email address with others. It is only used to allow you to reset your password. For details read 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.

Remove Ads
Don't know
Know
remaining cards
Save
0:01
To flip the current card, click it or press the Spacebar key.  To move the current card to one of the three colored boxes, click on the box.  You may also press the UP ARROW key to move the card to the "Know" box, the DOWN ARROW key to move the card to the "Don't know" box, or the RIGHT ARROW key to move the card to the Remaining box.  You may also click on the card displayed in any of the three boxes to bring that card back to the center.

Pass complete!

"Know" box contains:
Time elapsed:
Retries:
restart all cards




share
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

Ch. 19 and 20

Java recursion and method redefining

QuestionAnswer
Define Recursion. the computer programming process, whereby a method calls itself
What happens to the computer if it is executing a recursive method that has no planned method of stopping? The computer will eventually crash and an error will occur.
What are the 3 iterative control structures? for, while, do...while
Define a stack. the execution sequence of methods, and stores local method information.
What does LIFO stand for? Last in First out
Where is every program statement stored? The computer's memory
What handles program execution sequence? Index Pointer
When you add information to a stack, what is that officially called? Pushed
When a recursive call interrupts the execution of a method, what happens to the "unfinished business" at the end of the method? It will be saved in a temporary stack until it can be used.
What data structure controls recursion? Stack
What does a computer scientist mean when he/she refers to an elegant solution? frequently the most natural and obvious solution to many computer science veterans
x is a String, what is displayed by this statement: System.out.println(x); ? The string.
is the name of the ultimate superclass – the class that all other classes are derived from? Object
If x is a primitive data type, what is displayed by this statement: System.out.println(x); ? The value of the data
If x is a Java static array of double, what is displayed by this statement: System.out.println(x); ? Memory addresses
method is checked by print and println to see how the information needs to be displayed? toString
Why is it that every class has access to the toString method? every class come from the object class
Is the toString method limited to displaying the value of only one field? No
What method should be used to compare objects? equals method
Why does operator == not work for objects? It compares shallow values.
Do the implementations of the toString or equals methods have to be practical? They can be impractical.
Created by: Bananaboi