[Solved] How get the value of method with parameters in another class java?


You can import the another class and call the function.

First Java class
~~~~~~~~~~~~~~~~

Class A {
  public double getFunction(double val) {
     ...  
     return someVal;
  }
}

Second Java class
~~~~~~~~~~~~~~~~~

import <fromwhereever>.A
Class B {
  public void useAnother() {
    A aClass = new A();
    double result = aClass.getFunction(123.45);
  }
 }

2

solved How get the value of method with parameters in another class java?