New here, I'm a compsci student taking a java programming class. Pretty basic suff but I'm getting caught here and there wrapping my head around some stuff.
My question right now invoves making a method that takes a single int parameter and then prints all of the positive even perfect squares less than n.
This is what I have so far:
public class evenSquares { public void evenSquares(int n){ for(int j = 2; j*j <= n; j += 2) System.out.println(j*j); } }
public class evenSquaresDriver { public static void main(String[] args){ evenSquares testsquare = new evenSquares(1000); } }
This is giving me an error that "The constructor evenSquares(int) is undefined"