Use another pair of loops, or use a static method if the method is independent of the Square instances (i.e. if the method doesn't modify or access any instance fields).
If you don't want a static method and you only want the method to be executed once you should put the code into the constructor, or call it from there.