Working with Methods > Creating Methods > Calling Other Methods Directly

Calling Other Methods Directly
Suppose that the application contains the methods method1 and method2. It is possible to call a method by using its name directly in the Java code. This is equivalent to calling callMethod(), which is declared in the superclass ApplicationMethod (for this example, it is method16 in some application):
package builder;
 
import com.comsol.api.*;
import com.comsol.model.*;
 
public class method16 extends ApplicationMethod {
 
  public void execute() {
    // The following tow lines are equivalent:
    method2();
    callMethod("method2");
  }
 
}
To open the other method’s editor window, Ctrl+Alt+double-click on the method name in the code (method2, for example), or right-click and choose Go to Method ().