time()) die(); ?> AP CS
notes intro/old submit AP Problems the dump links

Quiz 14 - Static



1. An advantage of a static method is that you dont need to initalize an object to use the method.

true false

2. True or false: static is often used for constant variables because they never change so we dont need different versions of them: true false

3. True or false: the static modifier identifies the method or variable with the object, not the class true false

4. Which of the following would be a good use for a static variable?

an int that keeps track of a serial number

an int that keeps track of the last serial number given

an int that keeps track of how much money an account has

an int that keeps track of the name of who owns an account


5. How many versions of a static variable will be created in memory?

0 1 1 for each object created


6. True or false: Static variables cant be changed?

true false