| <<< Stack Class Java Example | Index | Constructor Invocation >>> |
public class Stack
{
// Constructors initialize the data members of the object:
public Stack( ) // default constructor
{
storage = new double[ 100 ];
top = 0;
}
public Stack( int size)
{
storage = new double[ size ];
top = 0;
}
// data members
private double storage[ ];
private int top;
}//class Stack
| <<< Stack Class Java Example | Index | Constructor Invocation >>> |