Floppy:
>I was reading the chapter about vectors, and find out that every element is
>an object. Why does each element have to be an object?
Object is the base class of all classes in Java. Each class extends
Object, thus every object can be stored in a Vector. So there is no
restriction when it comes to classes, if that's what you meant.
On the other hand, no variables of primitive types like int, char or
float can be stored in a Vector. That _is_ a restriction, which will
be removed in Java 1.5.
>Also is there a program that shows the stack and heep as the program is
>running?
Many IDEs give you the opportunity to check a variable's content while
the program is being debugged. BTW, it's "heap" (just so you are more
successful with web searches).
Regards,
Marco
--
Please reply in the newsgroup, not by email!
Java programming tips:
http://jiu.sourceforge.net/javatips.html
Other Java pages:
http://www.geocities.com/marcoschmidt.geo/java.html