stack class using push and pop methods

I am new to programming Java, and I have an assignment where I have to create a stack class that stores the first 50 numbers(0-50). I also have to use the push and pop method.

I am not 100% sure how to set this up. This is what I have so far. The thing I can't figure out is where to use the push and the pop.

package stack;

import java.util.*;

/**

*

* @author ppaparie

*/

publicclass Main{

/** Creates a new instance of Main */

public Main(){

}

/**

* @param args the command line arguments

*/

class Stack{

publicstaticvoid main(String[] args){

// TODO code application logic here

Stack stack =new Stack();

for(int i= 1; i <= 50; i++)

}

}

}

[1524 byte] By [paps33a] at [2007-11-27 10:25:52]
# 1

Crosspost.

http://forum.java.sun.com/thread.jspa?threadID=5194346&messageID=9764708#9764708

CaptainMorgan08a at 2007-7-28 17:36:09 > top of Java-index,Java Essentials,New To Java...