E
E
Eban2019-09-29 15:20:41
Java
Eban, 2019-09-29 15:20:41

I don't know how to call a method from another class?

The bottom line is that I have to call the method NOT through the object, I have already tried many times, here are my successes: (it gives errors everywhere)

public class Arithmetic {
  static boolean check(int[] array) {
        }
}
public class Demo {
  public static void main(String[] args) {
    check([4]); 
                boolean check(); 
                и тд хелп ребята
        }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-09-29
@Eban

Arithmetic.check(new int[] { 4 });
You should read a textbook.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question