This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Dustin Schreader wrote:ok I didn't declare newElement, so I'm assuming that whenever there are parameters you must declare them then. It's type T so how would I declare that?
Yes, you would have to declare any variable being used in the code. As far as the type T is concerned, it would work as follows-
So if your newElement is of type- String, then T would be String. Implicitly this type information will be passed to the method you are invoking.
Actually the type T would depend on the type information being provided while creating the instance of the class. Can you provide us the DropOutStack class definition?