> Hi all,
> I was given this quiz as it were. ..
Give it back.
(Follow-ups set to comp.lang.java.programmer only)
Andrew T.
> Hi all,
> I was given this quiz as it were. I'm asked certain questions about
[quoted text clipped - 5 lines]
> want to look at to understand this code further would be
> greatly appreciated. Sorry if I seem ignorant here.
Homework? Job interview? I'll give a few hints:
First, it's definitely Java.
> 1. Consider the following method:
>
[quoted text clipped - 6 lines]
> }
> What are the errors?
Have you tried putting this method into
a class and compiling? The compiler will
tell you quite directly what's wrong.
> 2. Consider the following methods:
>
[quoted text clipped - 12 lines]
> }
> What value is returned from the method run() after it is called?
ArrayList is a List, not an array (thus, no []).
It's backed by an array, which may give you some hints
about how it should perform. See the javadocs.
If you just want to know the value, you can just
ask Java. No problem. Really, though, this question
is asking you to think about the difference between
a reference, and the Object the reference points to.

Signature
Mark Jeffcoat
Austin, TX