Q:

method getSums in class RowBreaker cannot be applied to given types

I am trying to create a runner, but this error pops up:
method getSums in class RowBreaker cannot be applied to given types;
int[] sums1 = rb1.getSums();
error: method getSums in class RowBreaker cannot be applied to given types;
int[] sums2 = rb2.getSums();

Here is the main class code:
public class RowBreaker {

    private int[] arr;

    public RowBreaker(int[] GO) {
        arr = GO;
    }

    public int[] getSums(int[] arr){
        int theSum=0;
        int[] sum = new int[arr.length];
        for(int i = 0;i<arr.length;i++){
            int n = arr[i];
            while(n!=0){
                if(n%10!=0){
                    sum[i]=theSum;
                }
            }
            n=n/10;
        }
        return sum;
    }
}

And here is the runner, what seems to be the problem:
public class RowBreakerRunner {

    public static void main (String[] args) {

        int[] one = {36,271,343,2001,1048};
        RowBreaker rb1 = new RowBreaker(one);
        int[] sums1 = rb1.getSums();

        int[] two = {361,2348,174,129,7002};
        RowBreaker rb2 = new RowBreaker(two);
        int[] sums2 = rb2.getSums();
    }
}

I have tried google, and I do not have any friends that I can ask. Any help is appreciated! I am still new to coding concepts.

A:

The problem is in your int[] sums1 = rb1.getSums(); and int[] sums2 = rb2.getSums(); you have an int[] as your parameter so you have to pass something in. I suggest you remove the parameter from your method getSums and just use the private int[] arr instance you already have.
EDIT
Here's an idea of what your classes should look like:
import java.util.Arrays;

public class RowBreakerRunner {
    public static void main(String[] args) {

        int[] one = { 36, 271, 343, 2001, 1048 };
        RowBreaker rb1 = new RowBreaker(one);
        int[] sums1 = rb1.getSums();

        int[] two = { 361, 2348, 174, 129, 7002 };
        RowBreaker rb2 = new RowBreaker(two);
        int[] sums2 = rb2.getSums();

        Arrays.stream(sums1).forEach(n -> System.out.println(n));
        Arrays.stream(sums2).forEach(n -> System.out.println(n));

    }
}

public class RowBreaker {

    private int[] arr;

    public RowBreaker(int[] GO) {
        arr = GO;
    }

    public int[] getSums() {
        int theSum = 0;
        int[] sum = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            int n = arr[i];
            while (n != 0) {
                if (n % 10 != 0) {
                    sum[i] = theSum;
                }
            }
            n = n / 10;
        }
        return sum;
    }
}

Note: The code seems to be stuck in an infinite loop.

