100=>1
import java.util.Stack;
public class stack {
public static void main(String[] arg) {
Stack<Integer> s1 = new Stack<Integer>();
for(int i = 1; i<=100; i++) {
s1.push(new Integer(i));
}
while(!s1.empty()) {
System.out.println(s1.pop());
}
System.out.println("\n"+"This was from 100=>1");
}
}


Sign In
Create Account



Back to top









