Virtual Developer Workshop: Containerized Development with Docker
|Bruce Eckel's Thinking in Java||Contents | Prev | Next|
- Write a method that takes an object and recursively prints all the classes in that object’s hierarchy.
- In ToyTest.java, comment out Toy’s default constructor and explain what happens.
- Create a new type of collection that uses a Vector. Capture the type of the first object you put in it, and then allow the user to insert objects of only that type from then on.
- Write a program to determine whether an array of char is a primitive type or a true object.
- Implement clearSpitValve( ) as described in this chapter.
- Implement the rotate(Shape) method described in this chapter, such that it checks to see if it is rotating a Circle (and, if so, doesn’t perform the operation).