Call recursion method java
<p>I have defined a recursion method (at least I believe it is recursive) that returns void and want to call it in another method, but don't know how. I know it's very basic, but can someone please help? Thanks.</p>

<p>Recursive method: </p>

<pre><code>private static void recursiveWhiteToBlack(BufferedImage image, int width, int height){
    image.getRaster().setPixel(width,height, new int [] {0, 0, 0, 0, 0, 0});        
    int[][] neighbors = neighborsXY(width,height);

    for(int i = 0; i&lt;neighbors.length; i++){
        int neighborX = neighbors[i][0];
        int neighborY = neighbors[i][1];
        int[] neighborColor = image.getRaster().getPixel(neighborX, neighborY, new int[] {0, 0, 0, 0, 0, 0});

        if(neighborColor[0] == 1){
            recursiveWhiteToBlack(image, neighborX, neighborY);
        }   
    }   
}
</code></pre>

<p>Calling it:</p>

<pre><code>public static BufferedImage countObjects(BufferedImage image, BufferedImage original, ComponentPanel panel){
      BufferedImage target = copyImage(image);

      for(int width=1; width&lt;image.getRaster().getWidth()-1; width++){ //Determine the dimensions for the width (x)         

          for(int height=1; height&lt;image.getRaster().getHeight()-1; height++){ //Determine the dimensions for the height (y)

              int[] pixel = image.getRaster().getPixel(width, height, new int[] {0, 0, 0, 0, 0, 0});

              if(pixel[0] == 1){                      
                   none = recursiveWhitetoBlack(image, width, height);  //HOW TO CALL IT HERE!!!//

              }

      System.out.println("countObjects method called");
        return target;

    }   
</code></pre>
