CIT 591 Sixth Quiz
Fall 2001, Dave Matuszek
Name __________________________________

All answers must be kept brief. Points may be taken off for unnecessarily long or detailed answers.

  1. In order to write objects to a file, what interface must those objects implement?


  2. What kind of memory (or "knowledge") does a pure state machine use to keep track of the current state of the computation?


  3. If a pure state machine does not produce any output, how can you get any result from running it?


  4. What control structures would you use in order to implement a state machine in Java?




  5. What does the String method trim() do?


  6. What is the value of the expression "ABCDEFGHIJ".substring(2, 5) ?


  7. When should you use a StringBuffer instead of a String?



  8. What happens when the capacity of a StringBuffer is exceeded?



  9. What are the two ways of creating Threads?


  10. What are the four states of a Thread? (Just name them, don't describe them.)


  11. When you create and start a new Thread, which method does the new Thread execute?


  12. What keyword is used to prevent more than one Thread from accessing an object at the same time?


  13. Name four of the five Stack methods.