how to iterate a stack without iterator class

Solutions on MaxInterview for how to iterate a stack without iterator class by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "how to iterate a stack without iterator class"
Yannik
01 Oct 2019
1for(YourObject obj : stack)
2{
3    System.out.println(obj);
4}