• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is the Stack collection class on the exam?

 
Mahmoud Hossam
Ranch Hand
Posts: 74
Linux Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the Stack collection class on the exam?


Yes
 
Mahmoud Hossam
Ranch Hand
Posts: 74
Linux Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, thank you
 
Andreas Svenkson
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 5593
55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stack is legacy anyway. Use LinkedList/ArrayDeque instead.
 
Andreas Svenkson
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah it's more the risc of getting a question about it on the test I was thinking about

// Andreas
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic