You can use
Integer[] stobar = new Integer[100];
...
for(int b=0; b<stobar.length; b++ )
{
if(stobar[b]==null)
{
stobar[b] = row;
stobar[b+1] = col;
break;
}
}
Are you sure that you want to use a static array? Maybe an ArrayList is more suitable for you.
I don't know what are you trying but take a look at the following implementation
public class Point
{
private int row;
private int col;
public Point(int row, int col)
{
this.row = row;
this.col = col;
}
public static void main(String[] args)
{
List<Point> points = new ArrayList<Point>();
...
Point p = new Point(5,8);
points.add(p);
...
}
}