:
YourClass.xMethod(myDoubleArray);
Java:
YourClass instance = new YourClass();
instance.xMethod(myDoubleArray);
This will work, but is considered incorrect. The Java compiler will even complain about it. Because there is no need to call a static method, creating an instance of the class. Static means that the method is instance independent. Calling it through an instance is meaningless and confusing.
You will see later that there is a second correct way to do this, i.e. "reflection". But this is an extended topic, so I assume that you should not know this already.
source
share