Page 1 of 1
About Question com.enthuware.ets.scjp.v6.2.735 :
Posted: Sat Jan 25, 2014 10:37 am
by devlam
I couldn't answer the question because I didn't know the class Stack. It wasn't mentioned in my SCJP book.
Do we have to know this class?
Re: About Question com.enthuware.ets.scjp.v6.2.735 :
Posted: Sat Jan 25, 2014 11:18 am
by admin
No, you don't have to know about this class. However, this question is not really about Stack class. It is about pass by reference/value. But your point is valid. Although common knowledge, it is possible that one may not know what push() means. So a statement has been added to make it clear that the method push adds the passed object to the stack and toString of Stack prints the contents of the stack.
thank you for your feedback!