java pp MT 6

Card Set Information

Author:
gianni11
ID:
207591
Filename:
java pp MT 6
Updated:
2013-03-16 02:09:14
Tags:
MT
Folders:

Description:
MT 6
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user gianni11 on FreezingBlue Flashcards. What would you like to do?


  1. The ___________ reference is a name that an object can use to refer to itself.
    this
  2. What does this reference allow?
    a parameter to have the same name as an instance field.
  3. What does the this reference look like?
    public void setFeet(int ft) {

    • this.feet = ft;
    • //sets the this instance’s feet field
    • //equal to the parameter ft.

    }
  4. What does the garbage collector do?
    reclaims memory from an object that doesn't have a reference pointing to it.
  5. setting a statement to ___________ will  stop it from being used
    null
  6. if all statements are null the _________ reclaims the memory, the next time its ran.
    garbage collector
  7. What is Class collaboration?
    two classes interact with each other.
  8. In collaboration, the class can use the other classes ___________ & the _______ method to make a copy of the first class.
    constructor

    copy
  9. What does the Random class do?
    randomly generates numbers.
  10. How is the random class used?
    import java.util.Random;

    Random randomNumbers = new Random();
  11. The ____________ class is used to format double & float values.
    DecimalFormat
  12. What statement must be used to use the DecimalFormat class?
    java.text.DecimalFormat;

What would you like to do?

Home > Flashcards > Print Preview