
types of stacks
I am doing a nqueens problem using stacks. I'm trying to define a stack, but I don't know what type to use (e.g. int, char, or some object type.)
Stack<unknown> personsGuess = new Stack<unknown>();
To make a guess for the queens problem you pick a square on a grid such as row 1, column 3, or... row 6, column 2.
The problem says, "Each time a choice is made, the choice is pushed onto a stack that already contains all the previously made choices The purpose of the stack is to make it easy to fix incorrect choices."
the thing is I only know how to push on integer, float and double types. A first guess might look like "row 1, column 1" or row but how would this be stored onto the stack?

Code:
public class Choice {
public int rowNumber;
public int columnNumber;
}
Stack<Choice> choices = new Stack<Choice>()

so, if my program has one class and one a driver/test file, do I have a third file with what you just wrote?
or is what you wrote just written above my constructor?
EDIT. looks like it works just above my constructor...Thanks

Just a quick tip, we were just discussing this problem at a course at my uni. You don't acctually need the row and collumn numbers, just one or the other. Because, if you think about it, no 2 queens can be in the same row or in the same collumn, so you can break down the problem to a permutation of a list [1,2,...,n] and checking if the queens attack one another recursively. Because, the solution to the n queen problem is, that on a board size of n*n, each queen occupies one row (or one collumn).