Two Laptop Bag*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Is the Stack collection class on the exam? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Is the Stack collection class on the exam?" Watch "Is the Stack collection class on the exam?" New topic
Author

Is the Stack collection class on the exam?

Mahmoud Hossam
Ranch Hand

Joined: Feb 20, 2010
Posts: 74

Will I be seeing questions asking about the methods of this class?

I just saw this question in a certification book :
6. What is the result of the following statements?




Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3068
    
  33

From the official objective:
# Write code that uses the generic versions of the Collections API, in particular, the Set, List, and Map interfaces and implementation classes. Recognize the limitations of the non-generic Collections API and how to refactor code to use the generic versions. Write code that uses the NavigableSet and NavigableMap interfaces.


So you could find Stack as it implements List


Mohamed Sanaulla | My Blog
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Is the Stack collection class on the exam?


Yes


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Mahmoud Hossam
Ranch Hand

Joined: Feb 20, 2010
Posts: 74

Okay, thank you
Andreas Svenkson
Ranch Hand

Joined: Jan 17, 2011
Posts: 179
Does anyone else find it a bit odd that the Iterator given by Stack, doesn't return the elements in the LIFO order that the Stack is built for?

// Andreas
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Andreas Svenkson wrote:Does anyone else find it a bit odd that the Iterator given by Stack, doesn't return the elements in the LIFO order that the Stack is built for?

// Andreas


I find it odd that a stack would require an Iterator. And dont get me started about extending Vector....
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3615
    
  14

Stack is legacy anyway. Use LinkedList/ArrayDeque instead.
Andreas Svenkson
Ranch Hand

Joined: Jan 17, 2011
Posts: 179
Yeah it's more the risc of getting a question about it on the test I was thinking about

// Andreas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is the Stack collection class on the exam?