About Question com.enthuware.ets.scjp.v6.2.735 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
devlam
Posts: 50
Joined: Sun Nov 10, 2013 4:39 am
Contact:

About Question com.enthuware.ets.scjp.v6.2.735 :

Post 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?

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question com.enthuware.ets.scjp.v6.2.735 :

Post 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!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests