• Post Reply Bookmark Topic Watch Topic
  • New Topic

stacks  RSS feed

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to create araays of stack()?

e.g:
if i declare

Stack[] st=new Stack[100];
then if want to store values of stacks not by using push method only by stack adding, how to do that?

see below:
for(int i=0;i<100;i++){
st[i]=(stack type) i; // how to do this?
}
System.out.println(st.size());
 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what you're asking. What is "(stack type)"? The only valid thing you can really put there is "new Stack()".
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!