I wrote this code:
public class CheckerBoard {
public static void main(String[] args) {
// declaration and initialization - How big?
int N = Integer.parseInt(args[0]);
StdDraw.setXscale(0, N);
StdDraw.setYscale(0, N);
// Draw from lower left, up and across
// i is the index for the x value. j is the index for y.
for (int i = 0; i < N; i++) {
for (int j = 0; j<N; j++) {
if ( ((i+j) % 2)==0){
StdDraw.setPenColor(StdDraw.BLACK);
else StdDraw.setPenColor(StdDraw.RED);
StdDraw.filledSquare( 1, 1 , 0.5);
}
}
StdDraw.show();
}
And it shows in the result:
StdDraw cannot be resolved
at CheckerBoard.main(CheckerBoard.java:15)
I already added the std.lib in the window-preferences- java thing. Does anyone know what the problem here is?